Perhaps you made it farther than I have made it. It appears that Moodle 4.2 requires a database version (MySQL 8.0 or MariaDB 10.6.7) that is not yet available for either MAMP or XAMPP. I wonder how these installers get around that requirement.
In your installation, what database are you running?
They are using a slightly adapted XAMPP environment. The php sodium extension is indeed missing at the apache/bin folder. You can download php version 8.1.17 (this version is used for the current Moodle 4.2 installer package) here: https://windows.php.net/downloads/releases/archives/
Then you have to copy libsodium.dll to the folder apache/bin. After that, you have XAMPP running with Moodle 4.2.
It appears that the producers of the Moodle installers are still using earlier versions of the database, and somewhat "tricking" Moodle by editing the admin/environment.xml file.