Step 1: Figure out how many calories you need for your goals. Gain or lose weight. You can do this the simple way and start with 13-14 calories per pound or Google "Harris Benedict Calculator". This is just a baseline number so don't agonize over it.
Step 2: Figure out what macros you need to fit your goals. That's protein/fat/carbs.
Step 3: Adjust for allergies or dietary dogma (vegan, paleo, no dairy etc...)
Step 4: Eat that way for a whole month.
Step 5: Adjust calories/macros based on your results.
Step 6: Repeat forever.