Have a routine.
M: Work - Run 30 minutes - Spanish 1 hr - Coding 1 hr - Dinner 1 hr - Free Use 2 hrs
T: Work - Gym 1.5 hr - Dinner 1 hr - Spanish 1 hr - Coding 1 hr - Free Use 2 hrs
W: Work - Run 30 minutes - Catch up with girlfriend
Th: Work - Gym 1.5 hr - Dinner 1 hr - Spanish 1 hr - Coding 1 hr - Free Use 2 hrs
Fr: Work - Run 30 minutes - Go out
Sat: Gym 1.5 hr - Run 30 minutes - If possible, Spanish & Coding - If not, go out
Sun: Gym 1.5 hr - Run 30 minutes - Spanish 1 hr - Coding 1 hr - Meal prep for the week 2 hrs - Go out
I wake up at 9 and go to sleep at 2 am. If you have a set schedule that you know and can keep to, eventually people will plan around you. You're a constant so when they make plans that have you in mind, your schedule is already a given consideration.
Additionally, having flexibility to break your schedule every now and then is important. Be willing to give up your schedule for vacations, friends, etc. But the power of routine gives structure for you and others to get shit done.
And of course, none of this is possible without any sort of willpower. But that, no one can give you.