Online classes in photography can be very helpful, yes. They can be used in different ways and cover many different themes. Make sure you choose a platform or teacher with a good reputation, and think about taking courses that give you real assignments and feedback.