Let's start with some foundation in the order of importance:
- Energy Balance (Calories in vs. Calories out)
- Macros (amount of protein, carbohydrates, fat)
- Micros/Supplements (vitamins / minerals and sports supplements)
- Meal timing (how often you eat and how close to training)
Energy Balance
This is the simplest thing:
You eat less than you burn in a day to loose weight.
What makes this slightly more difficult is that there is a certain amount of uncertainty in measurement processes--both for the food and for the amount of calories you burn.
If your goal is to loose weight, but you are either maintaining or even gaining weight, you probably need to lower the amount of food you eat. While calories in vs. calories out is not a perfect model for everyone, it is good enough for most people.
Macros
You'll find some conflicting recommendations here, but the following general guidelines are good enough for most folks:
- Protein: 1.8 g / kg (0.8 g / lb) total body weight (4 Calories per g protien)
- Fat: 20-30% calories from fat (9 Calories per g fat)
- Carbs: all the rest of the calories to carbs if sports performance is important to you (4 Calories per g carbs)
Studies do show that there really isn't any advantage to more protein than this guideline.
Micros / Supplements
These do help maintain general health and in some cases they have at best a minor improvement in performance. Check Examine.com if you have any questions about specifics.
In general, if you take a multivitamin and some omega 3s you'll have pretty much all you need.
Meal Timing
This is probably the least influential of all the nutrition factors. Typically, if you consume your macros evenly throughout the day you will do better. Studies have shown advantage to eating at least 3-4x a day. More often than that has diminishing returns to the point that it doesn't make sense for most people.
Recommendation for you
You identified the following:
- You are a beginner
- Loosing weight is your primary goal
I recommend focusing primarily on calories in vs. calories out, and just make sure you have the recommended amount of protein and staying out of ketosis. The rest will take care of itself.
The amount of extra fat you are carrying does impact how much lean mass you might loose:
- Obese people will primarily lose fat
- Overweight people will lose more of a mix but still skewed toward muscle
The closer you are to a "normal body weight" the more lean mass you will lose as you lose weight. Going from normal fat levels to bodybuilding competition fat levels is a specialty topic and one I'm not qualified to speak toward.
Just as a personal anecdote, I was able to increase strength while losing weight in 2014 culminating in new personal bests in a powerlifting competition that year while weighing over 20 lbs lighter than the previous one. Slow weight loss, normal training, and staying out of ketosis were key elements of that process.
I used to recommend ketogenic diets but don't anymore. I was able to get fairly quick dramatic results on one back in 2010, but lost a lot of muscle mass in the process. Much of that was due to bad diet advice and my own ignorance at the time. I didn't have enough protein to protect the muscle mass I had (I was consuming less than 0.5g per lb body mass) and I wasn't doing anything that required the muscle to remain. Had I had the correct amount of protein and did strength training the results would have been better. Performance will suffer in a ketogenic diet because there are so few resources to do work. It's also the only time that increasing protein above the recommended amount might be worthwhile.