If I go to https://www.apachefriends.org/download.html
And choose one of the Mac downloads, such as 7.4.14 / PHP 7.4.14
This links to the download at https://www.apachefriends.org/xampp-files/7.4.14/xampp-osx-7.4.14-0-installer.dmg
Which downloads a file xampp-osx-8.0.1-0-vm.bz2
When I unzip this file, it results in a file xampp-osx-7.4.14-0-installer. Note that this file does not have a .dmg extension, and Mac will not open it.
I teach a course that uses XAMPP and so I go through the install process twice a year and have never had this problem. Typically the download gives me a proper .dmg file.
Note that if I download the installer from SourceForge (https://sourceforge.net/projects/xampp/files/XAMPP%20Mac%20OS%20X/7.4.14/), it does have the proper .dmg extension and I am able to run the installer.