Have an accountability partner.
It’s a simple principle that goes back to childhood. It’s the “buddy rule” at its best. Find a friend with similar goals and keep each other committed. When you miss a workout it’s not just yourself you are disappointing, but your partner too. Even if you’re not working out together, you can check on one another to make sure the work is getting done.