The way is to factor externalities in the final price, reward sustainable behaviour and set better standards. And that's what's going on: https://arstechnica.com/tech-policy/2025/12/how-europes-new-...
The same applies to labour conditions and quality standards. And don't bring up arguments like "it can't work" or "that hurt competitiveness": all workers around the world want the exact same thing, a livable planet for their children. The only ones to object are the global elite who one ends up defending when they make the current status quo sound inevitable.
Also, at this point DRAM availability is becoming a security risk.