Eat real food, not too much, mostly plants.[1]

Figure out what you want / like to eat, and perhaps why (more on this below).

Learn how to prepare that.

Use that to guide your shopping.

If you're not buying what you plan to / want to eat, you're going to have difficulty in preparing meals based on that.

Learn basics of nutrition. There are numerous guides, I've found fitness / bodybuilding books useful as they're strongly focused on macronutrients (carbs, fats, proteins), as well as micros (vitamins & minerals). They also tend to emphasize short meal prep and economy of ingredients. Tip: books oriented at women tend to focus far more on food and recipes. I've found the New Rules of Lifting series to be quite good in this regard, and whilst both the "For Men" and "For Women" titles emphasize nutrition, the women's book covers this in much more detail. These are vastly more useful than the "food pyramid", which is mostly a marketing tool for different sectors of the US ag & food industry.

Another element of fitness books is that they incorporate goals into meal planning. You can leverate this beyond simple fitness, keeping in mind that what you eat should serve some purpose. That purpose could be fitness, weight loss, muscle gain, or considerations such as ease of preparation, entertainment, variety, health concerns, limited storage / refrigerator / freezer space, etc.

Learn some basic recipies and foods. They're the foundation of a diet and menu, you can use or add to these to create a vast variety of dishes. Or you may decide you've got your go-to meals and go with those. If you don't have a cookbook or set of cookbooks, invest in some (perhaps checking them out at the library first).

If you plan on preparing your own meals, learn to cook. There are classes and courses (a great way to meet people as well), books, videos (a lot of cruft along with the good), and more. Keep in mind that there's a wide range of goals and intents behind these, from basics to social signalling (see the recent jarred garlic thread for all the social context mixed up in food: https://news.ycombinator.com/item?id=31943770).

Build up a basic kitchen and set of tools. That's your basic pots and pans, bowls, cutting board, a good knife or three (Chef's, paring, bread, for starters), spoons and spatulas, and a few basic tools (graters, presses, and the like), and some food-storage containers (for batched-preparation and leftovers). It really doesn't take much, and you can build with time. Low-tech is often best, and my most treasured utensiles are a 60-year-old cast-iron skillet, a Dutch Oven, and a chef's knife. Mechanised tools can be useful but you can go a long way without them: mixers, blenders, food processors, etc. Get a whetstone for your knives and learn how to use it (not necessarily in that order).

On tools: I've long longed for a KitchenAid stand mixer, and thought that this was essential for tasks such as bread baking. When I got into sourdough baking at the start of the Covid-19 pandemic, I found that an old ceramic bowl I'd received years ago from a friend was far more useful. What I did end up buying were a digital scale (about US$20), a dial thermometer (yeast is highly tempeature-sensitive), a bench knife (this resembles a spackling spatula, and in fact I bought and used one of those until I found a good bench knife), proofing containers, and a set of glass jars for my starter. The lessons being that 1) expensive mechanised equipment isn't necessary, 2) task-specific tools are, 3) measurement is often critical, and 4) you'll discover these over the course of your cooking/baking career. I still don't have that stand-mixer, though I'd kind of like to have one.

And if you don't like cooking for yourself, or want to minimise time spent doing so, find out what foods maximise both pleasure and nutrition whilst minimising time. The frozen foods section has vegetables which both won't rot and are often pre-sliced, which can be easily added to recipies, along with various meals and other options (check ingredents especially for trans fats, sugar, or other ingredients of concern). There's no shame in this.

Large-batch preparation (e.g., a stew for a few days), one-pot meals, stir-fry, learning how to make your own (sour)dough, and some basic frying, blanching, stewing, and baking skills will get you a long way. Combining fresh and prepared (frozen, shelf-stable, dried, ...) ingredients can give you a lot of flexibility.

Plan your weekly shopping around basic staples. If you can swing by a store for fresh produce and vegetables, that's a big bonus --- you can buy small quantities as you need them for immediate use.

And for the foods you want to eat less of: don't buy them. It's very hard to eat what's not available.

________________________________

Notes:

1. Michael Pollan, from In Defense of Food, which is a good book to add to your list, though perhaps not the best starting point.