That makes much more sense than a photovoltaic system, since the hot water can be stored cost-effectively.
Wrong again.
In summer, solar thermal produces a huge surplus of hot water, and the storage tank just stands full in the corner. Pressure relief valves open, the system practically produces nothing anymore because there is no consumer. 300-1000l tanks then just stand around uselessly; nobody needs such amounts of hot water. Advantage of photovoltaics: surplus electricity can be fed into the grid for compensation, the system pays off significantly faster (or rather, reaches ROI within its lifespan).
In winter, both options come with few advantages. If solar thermal is supposed to contribute to heating, it becomes significantly more expensive due to the hydraulic complexity compared to pure domestic hot water support.
Solar thermal only exists(ed) in new buildings to make gas heating permit-compliant. Hence the two token collectors on many house roofs. Economically, it's nonsense.
It only becomes interesting with a particularly high hot water demand, e.g., in multi-family houses or if a pool is to be heated. In a normal single-family house, it’s best to steer clear of solar thermal as much as possible.