Speaking only from my own beginner’s struggles with it and very slowly developing ability to do it.
First I found it easier to do at home than in class, until I realized that watching the instructor doing it while I was trying to do it was next to impossible for me. Something about the fact of visually following another person’s shifting as they kept balance was throwing me off. When she moved out of my visual range it was much easier to do. Probably not good to watch yourself in the mirror either.
I also found it was much easier to do early in the day than in class at the end of the work day. And it was much easier to do at the beginning of a session than after I’d done other poses, especially side angle ones.
So for me extra practice of doing it alone, or not looking at the instructor (or other students as they balance), doing it earlier in the day and earlier the session helped a lot when starting out. It is still easier that way but after focusing on doing under the special circumstances it has become slowly doable and easier when I don’t have them.
YMMV (Your Mileage May Vary) and none of this may help you.