A lot of people rely on external motivation to get them to the gym. Some examples: relying on preworkout to motivate them, relying on their gym partners to motivate them, looking at other people on Instagram or watching motivational videos to give them motivation. All of these things are external and temporary.
You have to realize that no one is making you go to the gym and no one really cares if you go. You have to trust in the process and bring yourself to the gym consistently. Make a routine and a hobby out of it. In order to be consistent for your life, you MUST enjoy it. A lot of people decide not to go to the gym because they don’t feel like doing anything hard. Well it would be 10 times better if they at least went and did a very easy 10 minute workout, rather than to completely abandoning their routine. Staying on a routine will bring the most results. Sometimes you might have to replace a difficult workout with an easy one. The most important thing is that you still go to the gym and don’t break your routine.