How to eat healthy when you’ve got to buy weeks in advance?

We’ve stocked up on some groceries and I’ve realized I’ve had to buy more pre packaged/unhealthy things instead of the fresh/healthier versions since I’m buying for the longer term.

How can I continue to eat healthy when I’ve got to buy things that are made to last weeks without spoiling?