Most of the environmental impact happens at the building of hardware, so putting even more websites in datacenter only increases environmental impact. All Capitalism has done here is completely forget that impact by telling you it's ok to do always more.
What we collectively need to do is not find a better tech, it's reduce the total amount of tech we use, and that starts with questioning our actual uses. We don't need 24/7 available websites, 90% availability is more than enough. In fact, more sites should only target 90% availability, and if we were serious about tackling this we'd look towards 1. using old computers to the death because they still can and 2. doing more offline-first. Putting your website in a datacenter is exactly what the Jevons Paradox (https://en.wikipedia.org/wiki/Jevons_paradox) warns about. Its environmental impact keeps exploding year after year and it's not with that mindset that we'll make a dent in it.
(Remember, the environment is not a resource, so Capitalism doesn't care about it)