For both basements and crawl spaces, you need to address outside entry points next by patching cracks in the driveway using cold-mix asphalt patching compound. For a concrete sidewalk or driveway, use ordinary cement. Also clean gutters so they won't overflow. And make sure the soil around the foundation slopes away from the house 1 in. And add downspout extensions if needed so gutters drain 4 ft. away from the house onto splash blocks.
Many homes have an existing underground drainage system.
Unfortunately, the system often breaks apart or fills with silt after several decades. But often they just have to be capped off at the surface and abandoned. Instead, drain rainwater from gutters into a dry well - a hole lined or filled with gravel or a tank that allows runoff to soak into the ground slowly. Install a dry well at least 10 ft. 3 ft. deep.