Step 1: Go to https://www.apachefriends.org/index.html

Step 2: Download the Linux version of XAMPP.

Step 3: Click Crtl+Alt+T to open the terminal.

Step 4: Move to the 'Downloads' folder using the terminal command

cd /home/[username]/Downloads
Step 5: To make the downloaded file executable, run the command

chmod 775 [Package Name]
Step 6: Now that your file is executable. Its time to run it, for that type

sudo ./[Package Name]
Step 7: Now you will have your installation window opened. Click next until you find Finish.

Step 8: To open the XAMPP, type

sudo /opt/lampp/lampp start

That's it. Hope it was helpful.
Comment below if you have any doubts.