How to make enemy pass route that has obstacle

see my screenshot, capsule is enemy, and sphere is player, I hope enemy pass the route and meet player, and assume it’s uncertain route, is there common algorithm to do it?

A very common algorithm to do this is called the A* Algorithm. It’s not hard to implement, but if you are new to coding, you can use Unity’s Navigation System, as Ermiq mentions.

I personally find the builtin Navigation System very restrictive in how it moves characters, so if you want to implement your own, start here: A* Algorithm on Wikipedia. The article even has some pseudocode that you can more or less adapt, right into your game, and change to your liking.

Your example is grid-based, and A* works really nicely with grids. In your case, I’d internally represent your level as a 2D array of bool, representing free and obstructed spaces.

Good luck!