The other route, and it works well for people who freeze at the blank page: rebuild something that already exists, then change it.
Pick something small and well understood, a URL shortener, a markdown previewer, a simple game, a command line tool you already use. You do not have to invent the specification, which removes the paralysis, and you can check your version against the real one at every step.
Then, and this is the part that matters, break it on purpose and change it. Add a feature the original does not have. Make it handle a case it does not. That transition, from following a known shape to deviating from it - is exactly the skill you are missing, and it is much easier to practise when you already have something working.
On getting stuck an hour in and losing the thread: that is not a sign the project was wrong. Getting stuck is the job. The difference between a course and a project is that a course removes the stuck part, which is why courses feel productive and teach less.
What helps concretely:
Write down the specific question when you get stuck, before searching. It slows the drift.
Timebox the search. Twenty minutes, then try something even if it is wrong.
Stop at a point where you know the next step, so tomorrow starts with typing rather than remembering.