How to move AI avoiding obstacles on the path?

Depends on the obstacle.
If it’s a static obstacle, it should avoid it if placed on the nav mesh
if it’s a dynamic obstacle, you will need to change the navmesh settings in your project.
If you are still having issues, you might need to look into steering behaviors.