First of all, it really depends on how much you already know, and also the way you learn personally.
If you learn something new then watching a YouTube video may not be a bad idea for basic understanding and the capabilities of the language.
However, the thing here is that you want to create the problem-solving mentality, and by watching a video, you are not really seeking to find the solution to the problem, but simply write what is shown. This is of course better than just watching the video.
Best way to test your knowledge, is to build something easy, or close to what you’ve already watched. Don’t go advance, keep it simple.