Hey Edwin!
Thanks for joining in today!
This is a great question! There is no perfect answer, because everyone is different! My first advice to you would be to allow yourself to take breaks. Within the motivation comes exhaustion. The last thing you want to do is overly exert yourself mentally, because in those moments is when it's most difficult to keep pushing forward.
With my coding, what keeps me most motivated is having accountability (making a project with a group is helpful). I also like to learn and try new things to keep me excited! Currently I'm working on improving my CSS art as well as being more mindful of accessibility. This excites me because I love art, I love learning how coding is creating art. For accessibility, I love including everyone to my code, so it's very important that the work I put out is accessibility friendly. It's a work in progress so I'm making my mission to make all my projects accessible! Hopefully within the next few months all my projects will be 100% accessible!
I hope this was of help to you! If you have more questions please reach out on Twitter! Thanks!