How to fix missing PHP ext-dom for Composer
The dom extension belongs to the XML packages. On Ubuntu or Debian:
sudo apt install php-xml
Version-specific packages such as php8.3-xml also exist. Verify:
php -m | grep -i dom
Restart PHP-FPM or Apache after installing. On Windows, enable the extension line in php.ini.