In my experience, as well as the common advice from others in the old defunct Dream.In.Code forum, the best practice happens when you tackle a project that interests you. Sometimes the project is interesting because it is useful (eg. I need a pretty printer for my code because my CS teacher was very strict about formatting). Sometimes, the project is interesting because it's a game or hobby that I like (eg. I wanted to be able to practice playing an obscure card game only common in my local region/country). Other times, the project is interesting because it's something that I wanted to learn more about (eg. I wanted to learn more about Vigenere ciphers). The key thing is that it should hold you interest to that point that you wouldn't mind creating a second, third, or even tenth iteration of implementing it again as you learn more about how to better organize code and data structures, or you learn new techniques and algorithms.
As for starting out, often finding a good book and/or tutorial is the best approach in my opinion. I don't learn well from videos and just watching other people do things. I'd rather get my hands dirty and try thing out myself. The videos maybe encouraging in terms of being able to get an overview and the confidence to have seen someone else do something, but a written book or tutorial is much easier to review and re-read in detail -- specially if there is code involved -- as compared to trying to keep rewinding and pausing a video.