First of all, if you go to the gym, you must go to a place close to your life circle at a fixed time every day or week, and develop a good habit of habitual exercise, that is, the cultivation of consciousness and self-discipline.
Secondly, if you are at home, you can combine some outside exercises, such as fitness facilities in the community or nearby parks. If you are at home, do one or several exercises every day for a short time, 10 minutes is enough. The important thing is to step by step and persevere!
I hope it helps you!