Go to this link https://sourceforge.net/projects/xampp/ and download the zip file which at the time of this tutorial is /XAMPP Windows/8.0.11/xampp-portable-windows-x64-8.0.11-0-VS16.zip
Step 2. Extract php folder from the zip file
Step 3. Place the php folder in the Xampp folder
Step 4. Open the XAMPP Control Panel and click the config button
Step 5. Click the Config Button next to apache
Choose the option Apache(httpd-xampp.conf), It will open the configuration file httpd-xampp.conf and change the lines highlighted from php 7 to 8. Be sure to change all the lines with php7_module to php_module throughout the file.
Step 6. Save and restart Apache
Reference link : https://wecode101.com/upgrade-xampp-from-php-7-to-8-windows-10