How does one stay motivated when working on a project or when learning a given programming concept?

I'm open to hearing your thoughts on how to improve one's resilience through this learning processπŸ˜πŸ€”