Back when I was in (boarding) school, we had to wake up at 5 a.m. every day apart from Sundays. It was honestly a struggle for me to get used to this initially, but after maybe a couple of months of constantly waking up so early, my body couldn't do without this routine—to the point where I even woke up earlier than the stipulated time on certain days.
This simple routine of waking up early helped me build so many good habits, and it also meant that, as a result, I had to sleep early too (no later than 10 p.m.). Thinking back now, I really think this is what helped me perform well in school, and this principle of having a routine and sticking to it applies to every other aspect of life.
Routines can be very simple: game/movie nights on Fridays with your friends, coding/designing for three hours every day, playing football every Saturday, reading ten chapters of a book every day, etc.
Doing these things gives you clarity on how you want to spend your time each day and, in turn, makes each day feel productive. Routines also ensure that you're keeping your brain healthy and that you build a positive dopamine cycle by putting your time into things that actually require effort.
So, write down routines you want to build today, and although you might struggle with them initially, they eventually become effortless and the default. Don't forget to document your progress so you can look back on your growth—even if your routine involves you having fun.