Lost 100 pounds about 3 years ago and have been in your shoes multiple times. My tip is that there is no single way to motivate yourself. Different things work for different people, or even for the same person at different times.
For example, I initially lost the weight and built a lot of muscle playing football in high school. I kept it off and continued working out knowing I was working towards becoming a better player. As I went to college and played football my freshman year and didn’t continue after that, I felt some of the weight come back on. As I no longer had football, I had to find a new motivator. I began to simply see it as a way for myself to grow personally, to (cliche I know) be the best version of myself. Unfortunately, and despite this remaining as my outlook, the laziness comes back. As of lately what has been working for me is finding joy in the previously mundane. I have picked running and biking (rather than going to the gym) as a hobby.
This has kept me consistently active whilst maintaining a healthy diet, which would my second tip; diet, diet,diet.
Some people advise not to simply count calories, but this is the most surefire and simple way to lose weight. Burn more calories than you eat. Your BMR (how many calories you need to survive whilst sedentary) can be calculated by your body weight * 10. Just eat less than that, typically 200-400 calories below that is sufficient, but if you’re active or workout you want to increase your caloric intake to match calorie expenditure through activity.
In sum, you really need to find what motivates you and ride it.