So it is year 2024 and the max BTC supply is reached at ~21M.
Just putting up solar panels means nothing.
If the thing you do, be it mining, manufacturing or anything else is not profitable then it's stupid to build solar panels and use that energy for it. It would be far better to just sell the energy you make with the panels.
If a large mining operation invested in solar to supplement the energy costs, why sell the energy when you can use it specifically to run the hardware?