if you dont have a functionning draining system around the foundations, you need to keep water away by changing gutters and modify slopes / hills, changing windows in basement and buying back flow preventers.
A house need a good hat (roof) , vest (walls isolation) and shoes (foundations).
Water can enter basements either from old rotten wooden windows, from cracks in the foundations or from the drain (too much water in spring, for example, when snow is melting, municipality redirects water in the sewers, water goes inside basements if no back flow preventers are installed).
The critical period is spring if you live in an area with a lot of snow, or if there are storms that suddenly saturate the soil with a lot of water.
Gutters must lead water from the roof far away from the foundations of the home, it means extending the gutter underground to reach a burried well in your backyard. And you have to have positive hills/slopes that redirects water falling near the walls of foundations away from them on the surface. Negative slopes directs water toward the foundations walls. Most of the time it's improper gutters configuration that saturates the soil around the house with water and leads to leaks from windows or cracks. Just make sure gutters dont lead water right near the foundations of your house, extend them far away and create positive slopes.
You can install a draining system that is connected to the local sewers but it costs a lot. Most of the time redirecting water from gutters far away in the backyard in burried wells, building new positives slopes going to 2 or 3 meters away from the foundations and installing new windows in basement is enough to protect your house. You also have to have back flow preventer installed between sewers and your house's plumbing so water doesnt flood your house.
Now if you have minor cracks, you can fill them from the inside, if you have huge crack you ve got to dig along the house's fondations to fix them with a special filler and it costs a lot to dig.
Do you have a draining system installed? where is the house?