It’s not as simple as that. All people don’t get fat for the same reasons. I never eat junk food, and yet I still got fat during the pandemic.
For me the issue was that I stopped exercising during the lock down, but continued to eat the same amount out of habit. This led to me putting on a bunch of fat without realizing it.
To fix the issue, I primarily scaled back the quantity of food I ate without changing its composition too much.