I learned to cook in a restaurant setting (a nice restaurant, not Applebees or something), but the skills used to train line cooks apply to home cooks as well. You just have to be more deliberate with practice since you don't get the opportunity to cook 200 dishes a night.

Essentially, you learn one dish really well. To the point where I'd understand every action perfectly. Say it was a dish with chicken breast fried with some veggies, sauce, then tossed with pasta. They'd show you what the chicken should look like before you add the veggies, then how the veggies should be cooked before the sauce is added. Then the rest would be adding the sauce, pasta, and plating.

Once you had one dish down, you'd then learn the dishes which are permutations on that one dish. So chicken with peppers and onions in a garlic butter sauce, chicken with onions and mushrooms in a red wine sauce, chicken with tomatoes and peppers in a spicy sauce, etc. You get the picture. So every night for a week or so, whenever those four dishes would be called, I'd take them, that's all I did.

Most proteins pan fry about the same, the biggest difference will have to do with thickness and appropriate doneness determines how much heat you use. But for the most part, food is forgiving, especially when served with a sauce.

Veggies are tough. Cooking a veggie correctly is mostly in the prep and cutting, with moisture being the other big consideration (wet veggies macerate initially when fried). The good news is, you probably eat like five veggies regularly, so focus on learning how to cook your Big Five veggies first and you'll be good. You can use frozen steam veggies to supplement your diet while you learn.

Baking dishes is fairly straightforward. Generally small things require lots of heat and short cooking times, while large things like casseroles require lower heat for a long time.

Grilling is easy-ish. Commercial gas grills are hot up front, cool in the back. So you'll generally first oil the grates with an oil rag, then put a protein on the grill for 4 minutes, after which you turn it 90 degrees for another 4 min. This will produce grill marks you get in nice restaurants. Then flip it over and move it to the cool side of the grill until it temps out. Very large proteins (like pork tenderloins or thick cut chops) will be finished in a hot oven or covered with a cloche to get to temp without burning.

Pastries, breads, cakes, etc are their own specialized domain. If line cooks were JS devs, pastry chefs would be doing C++. My advice is to buy Duncan Hines and focus on decorating.

Learning to cook is not that different than learning most other skills. Start with simple things to develop fundamentals, then slowly add more fundamentals to your repertoire.

It is 100% okay to follow recipes. In fact, i highly recommend it because most recipes will use fundamentals. America's Test Kitchen is great. As is Serious Eats (the website), especially for foreign/fusion cuisine. I do a lot of cooking out of the Better Homes and Gardening cookbook as well, especially backed goods. If you're an American mid-westerner whose mom/grandma was a great cook, there's a good chance she was making dishes from that cookbook.

Edit: oh yeah, buy a probe thermometer! Seriously, it's the best cooking investment you'll make. 90% of the compliments I get on my cooking are because I'm cooking meat to the appropriate temperature.