Diesel lean or fat

Hello need simple explanations :-). I want to know what the amount of fuel injection is determined by the diesel (sensors etc.) I have been looking for about a week on the internet and don’t come to the answer that I want or is usable. Always read that a diesel lean runs because it has air surplus. That may be true, but there is a point. There are so many sensors on the engine why (should) a diesel lean run? With a petrol engine a lean run is bad for the long run. n engine is too hot because the exhaust gas is too hot. Does that mean a diesel doesn’t matter? don’t think. And if a diesel is too lean it wouldn’t be soot, would it? I don’t understand even if an old diesel doesn’t have a lambda probe it doesn’t have to run thin. The sensors determine the values of speed, air mass, etc. and the control unit adjusts the injection amount to the air supply and so you wouldn’t have a lean run (even in the partial load range) or? Please don’t copy anything since I’m looking at this. r already read if it’s on the internet :-D. Lg xorgx