Asking this question shows that you have the determination to exercise and lose weight. I like it for you!
First, the atmosphere of the gym is easier for people to stick to and the effect is relatively good.
Second, fitness at home requires personal self-discipline, perseverance and perseverance.
Since I bought a treadmill, I suggest exercising at home, so I don't have to spend money on going to the gym. The key is to make a plan and persevere.