This is a good question and to be honest it's not easy to get back after falling off. But one thing that helps me based on experience is remembering the amazing feeling that comes after I do a workout session. And the feeling of accomplishing my goal gives me more confidence and creates more evidence to convince myself more that I am a fit and healthy person and I love myself so much to take care of my physical needs and health. Also when coming out of a funk, I start small and then progress to larger and intense workouts. This tricks my brain into getting used to my former habits which is easier than starting intensily and being hard on myself. Also I am reminded of where I want to be as a person and I ask myself if the habits am cultivating now are helping me to achieve that goal. If not, then I ditch the lazy act and get moving to reach my higher and better version.
This happens to me a lot as I do shift work and sometimes i have weeks a I do a lot of overtime shifts. Once I got off track my workout routine, I do my best not to beat myself up but instead schedule ahead on my days off to workout. Sometimes it will take weeks before I can have a proper day off so I think of exercise that I really enjoy (like running, HIIT, yoga and bouldering) and I schedule them in my short free time despite having a busy day. It makes me feel happier even if I only worked out for 10 minutes as I know I did something good to my body and mind. Then I'll jist keep doing short workout then eventually I can increase the intensity again and be back on my workout track.
You have to motivate yourself, take time and reflect on why you workout and what you are expecting from doing the task. Personally motivation played a major key when I felt like I cant do more. Just try this technique and hope you will achieve your goal soon.
I like to start off with a workout that I know will be easy for me to do. That workout either inspires me to do more and reminds me of how much I can do