In aggregate, grid operators have a lot of other tools at their disposal via flexible pricing, flexible demand, and automated systems that can adapt to this to e.g. charge cars when there is a surplus of energy, turn on/off water boilers, etc. There's a lot of innovation around this topic in this space. This by the way is as much as making sure generated power doesn't go to waste than it is about ensuring there is enough power. They use batteries to time shift excess power to when they can utilize it.
Interconnected grids means that e.g. an operator in Denmark can import/export to and from the UK, Norway, Germany, etc. On a windy day they'll be exporting wind power. On a sunny day, they might add some solar to that mix. When there's no wind or sun in Denmark, they might pull in Scottish/German wind, Norwegian hydro, Swedish nuclear, etc. Batteries are being deployed all over the place at a pace that is only exceeded by the pace at which solar is being deployed. Whenever there's a surplus energy, batteries get charged up. It's very rare for all of the available generation to disappear all at the same time for long enough to drain all the batteries. And for those times of course fossil generation is still a thing as well, and will be for decades to come. There are a lot of gas based plants throughout Europe. As well as some nuclear plants of course. Singling out the EU market here but it's going to be similar elsewhere.
The point here is that there's no need to pair solar setups with days/weeks/months worth of storage. A few hours goes a long way.