The EU is introducing an energy label for phones, together with mandatory requirements for phones sold in the EU;
- 5 years of software updates (AFTER they stop selling the device in the EU)
- providing important hardware parts (during sale and for 7 years after), including free software (if needed), to every repair shop, within 5-10 business days
- batteries have to make 800 charging cycles and still be above 80% original capacity
And on top of that, phones and tablets need this energy label (which also includes a fall damage durability and repairability score), and abide by the above requirements, from 20 June 2025.
(https://energy-efficient-products.ec.europa.eu/product-list/smartphones-and-tablets_en)

@piggo @elly @ShadowJonathan looks like it's a Regulation - those don't need to be transposed into national law, they're directly enforcable