If you are really serious about this, you can calculate it.
First, obtain the macronutrient counts per 100 g of ingredient you are adding. For example, lentils have 26 g of protein per 100 g.
Second, weigh everything you are adding. Let's say you want to cook 200 g lentils.
Third, calculate the total amount of nutrients you added. With my nice round numbers, it will be 52 g proteins from the lentils.
Fourth, weigh the prepared dish. (it doesn't help to sum up the raw ingredients only, because water will evaporate during cooking). Let's say you end up with 700 g of cooked lentils.
Fifth, calculate the new protein amount per 100 g. 52 g protein per 700 g lentils makes it around 7.4 g protein per 100 g.
Now you are ready. You only get a small amount of error when some nutrients are destroyed by cooking, for example a maillard reaction will involve both proteins and carbohydrates as input and produce carbohydrates only. But it is a very small error; the variability of nutrient levels between batches of the same food are much greater than this error. (You don't believe that every lentil kernel around the world has exactly 26% protein, right? The data you see on labels is an average of a few measurements, and the single batches can vary a lot).
Note that you can't do this for micronutrients, because many of them are affected by cooking.
Also, don't even attempt to do it using volume measures. Once you mix two different liquids, the volume of the mixture isn't always the same as the sum of the two volumes you started with. Also, solids can absorb liquids without changing their volume much, etc.
And of course, you have to do it separately for each recipe to get a reasonable degree of precision. You can't just rely that lentils cooked in pure water will absorb the same amount of water as lentils cooked in a, say, soup soured with tomato juice.
If you still think this all is worth it, go ahead and do it. Most people don't need such a minute control over their diet, especially when they cook by themselves and know (roughly) what goes into their meals.