This is a Technical Journal: Headlamp condensation inside lens - information/leak test. If the result is not ok (air leak), it is ok to replace the headlamp
NANHTSA · manufacturer bulletin11033732
Service bulletins
Concerns: Volvo C40 (Model years 2025) · Volvo EX30 (Model years 2026)
Sources: NHTSA (United States, public domain), Transport Canada (Open Government Licence – Canada), DVSA (United Kingdom, Open Government Licence v3.0), RappelConso and EU Safety Gate (France, Licence Ouverte 2.0).