Update your Debian VPS
First of all, you must have your system updated.
sudo apt update
sudo apt upgrade -y
Repository
Add the PHP 7.3 repository
sudo apt -y install lsb-release apt-transport-https ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
Update your system again
The final step to installing PHP 7.3 on Debian 9 and Debian 8 is to update your system again, but with the dependencies added:
sudo apt update
Check your system's current version
php -v
PHP 7.3.29-1+0~20210701.86+debian9~1.gbp7ad6eb (cli) (built: Jul 1 2021 16:11:36) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.29, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.29-1+0~20210701.86+debian9~1.gbp7ad6eb, Copyright (c) 1999-2018, by Zend Technologies
(Optional) Add libraries or extensions.
Find the libraries you need and install them just like in other versions of PHP.
sudo apt install php7.3-