When water enters the engine, the damage can be different depending on the driving speed. An engine may need to be repaired from start to finish, or the engine may be completely unusable. Once, when a car driving through water got water in the engine, when I came to repair it, the cone broke and the engine block went through.
If water gets into the engine while driving at a low speed, it will stop the engine immediately and plug (gasoline), Remove the nozzle (diesel) and turn the engine by hand or by turning the starter motor to release the water from the engine. It would be better if the water in the engine combustion chamber could be pumped out. If water enters the engine while the car is parked, it can be done as above.
If you turn on the ignition without realizing that the car is parked, it can damage the starter motor. Therefore, when driving on a flooded road during the rainy season, you should slow down and take special care to prevent water from entering the engine.