Time allocation depends on the type of work.
This is one of the biggest problems that I am currently facing.
Alongside a full-time job and other commitments.
Consistent study becomes extremely hard.
Especially for coding-related courses.
The advice I was given in the start was spend a fixed amount of time everyday.
That seems right at first, but only works if you have more than 1 hour a day to spend on the project.
But what happens when you only have 10-30 minutes (This is the case for me)?
Most courses have a theory section and then a project at the end.
See The Odin Project as an example. (This is the one I am currently doing)

The solution is simple.
If you are in a theory section, 10-30 minutes is fine to spread out every day.
However, when you are on a project, try to spend 3-4 hours at a stretch.
This way you don't have to keep reloading context every day.
Plan that block at the start of your week.
Allocate your 10-30 minute daily slots to other tasks, so when you are doing projects that week, you can do an entire block.