The governments have to subsidize solar, so it can compete with government subsidized fossil fuels. You may be surprised to learn that global fossil fuel subsidies rose from $4.5 trillion in 2015 to $7 trillion in 2022.
https://www.statista.com/chart/31016/volume-of-global-fossil...