Many people rather relax than work.
They say they don't feel motivated to work. They need to feel motivated.
You already have the motivation. That's why you want to work in the first place. That's why you feel guilty if you don't work.
You don't lack motivation.
The problem isn't with motivation.
The problem is you didn't act on your motivation.
You let your resistances stop you.
In Turning Pro, Steven Pressfield talks about how professionals show up and do the work every day.
They show up when they don't feel like it. They still show up when they're tired.
They start work at the same time every day. And they don't stop until they accomplished what they set out for.
You need a system like that.
You need to create an environment where you can work. Set a start time. Set an end time. Don't let anything distract you between the times.
Keep doing it and you'll form a habit. When you form the habit, it becomes much easier for you to maintain the system.
You can narrow things down and say "I'm going to focus on functions today". The next day, you can say "I want to learn For loops", and so on.
Break the large tasks into small tasks the night before (or the week before).
Work requires energy.
You owe it to yourself to recharge.
Different people recharge differently. I usually meditate, take a nap, or shower.
Find out what works for you and do it before your session.