Error: database driver problem detected
The site administrator should verify server configuration
Microsoft Drivers for SQL Server for PHP are not installed or not configured properly.
You need the Microsoft Drivers for PHP for SQL Server to access SQL Server from PHP
Microsoft's driver doesn't have a production release for PHP 7.4 yet but there is a preview release.
If you wanted to go ahead with this then the steps should be:
The Microsoft Drivers for PHP for SQL Server have dependencies (Visual Studio run-time and ODBC I think) so you may need to download these if not already present, see System Requirements on the production driver download page for details.
Here's a command line test to see if the driver is installed to be run from the PHP directory:
.\php -r "echo 'sqlsrv_connect() ' . (function_exists('sqlsrv_connect') ? 'present' : 'not present') . PHP_EOL;"
This should display "sqlsrv_connect() present" if the driver is loaded correctly (and "not present" if it's not).
I'd use the latest that the Moodle version supports, PHP 7.3 in this case (i.e. 7.3.14 at the time of writing).