If you’re trying to build strength, the main thing to care about in your nutrition is protein. Keep in mind it will be difficult to build muscle if you’re trying to lose weight and eating at a large calorie deficit at the same time. (In case it’s not clear, this is not a post about eating for weight loss.)
How much protein?
There are some differing opinions on how much exactly you should eat, but a good number to target is 1.6g per kg of body weight, or 0.7 per pound (link) (the range of recommendations is from 1.2 to 2g per kg of body weight, so this seems like a happy medium). So if you weigh ~70kg, aim for ~110g of protein daily. More than that will probably have little effect, but if you’re not convinced you can always try it and see how you feel. Some say it can be dangerous to eat too much protein, but research doesn’t necessarily show that (see previous link).
In fact, pretty much every claim or advice in here has some evidence for or against it, so take it with a grain of salt. If you are progressing well, keep doing what you’re doing, otherwise tweak things until you see results.
There’s also been some research demonstrating that the body can only process 20-30g of protein at a time (link). This means you might want to spread out your intake over the day, approximately 3 hours apart (link). This amount also depends on body weight, and one calculation I’ve seen is suggesting that protein post-session should be 0.3g/kg. So for a 70kg person, that is 23.3g. And if the daily target is ~110g of protein, it’s probably best to spread it fairly evenly between four meals.
When to Eat?
Another common piece of advice is that you should eat a lot of protein right after your workout. There is some truth to this, but it doesn’t have to be incredibly strict (link). As long as you eat some protein within a couple hours before or after, you should be okay.
A separate thing to consider is what to eat before you work out so you can perform well. The research on this is not conclusive (link). Personally, I feel best when I’ve had a bit of caffeine (coffee or tea) and a light meal/snack with some carbs in (simplest option being a banana) 30-90 minutes before.
Caffeine is one of the few substances that has pretty reliable evidence showing it helps with work out performance. If you use it, time it right – finish it at least 30 minutes before you finish your warm-up, so it has time to kick in. Being hydrated is important, but drinking too much water can also be uncomfortable. It’s recommended to drink a glass of water 30 minutes before work out.
Unlike some other disciplines, in yoga it’s often recommended to exercise first thing in the morning on an empty stomach, especially in Mysore-style ashtanga. I rarely do that unless I had a large meal the night before and really don’t feel hungry, but your mileage may vary. Some people like to strength train fasted too, but I am not one of them.
As always, it’s important to stay hydrated. Another factor to note is that excessive alcohol consumption can hinder muscle growth, especially soon after exercise (link).
Apart from those guidelines, in my opinion you have to worry too much about the finer details of what you’re eating, unless you have specific body recomposition goals or dietary requirements. Everything in moderation, lots of vegetables and fruits, etc., since a balanced diet can help with absorption of protein and other nutrients. There are a lot of popular diets and restrictive ways of eating, each with reasons for and against it. For instance, cutting carbs has been very popular for a while, but is now starting to see more counterpoints. If certain restrictions work well for you, go for it, just know that you don’t have to.