Both work. Studios offer hands-on guidance; home practice gives flexibility and convenience.
How to Start Yoga as a Complete Beginner!
Beginners benefit from in-person feedback on alignment and breath. Once you have foundations, online classes and books can deepen home practice. Many practitioners blend both.