Shock your pool right after heavy rain.
Shock it.
Heavy rain dumps debris, dirt, and algae spores into your pool while diluting your chlorine. That combo is a green pool starter kit.
As soon as the rain stops and the water is calm (no lightning), add a non-stabilized shock to bring chlorine to breakpoint level—usually 10-15 ppm for most pools. Run the pump 24/7 until the water clears. Check pH and alkalinity afterward, because rain tends to drop pH.
You can also add a little algaecide as backup, but the real move is hitting it with chlorine before algae gets a foothold.
A little prevention—keeping chlorine up before a storm—helps, but shocking after rain is the difference between clear water and a swamp.