Based on the official instruction here: https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
sudo apt install --assume-yes php-cli unzip
You may replace the commit hash by whatever the last commit hash is on https://github.com/composer/getcomposer.org/commits/main
cd ~
wget https://raw.githubusercontent.com/composer/getcomposer.org/d3b829dc7a936a67d4fb9baf7e3502cb55d77548/web/installer -O - -q | php -- --quiet
sudo mv composer.phar /usr/local/bin/composer
composer