Had similar issue with adding php_lua.dll to xampp.
I downloaded the dlls from here: https://pecl.php.net/package/lua/2.0.7/windows
For XAMPP I needed following version: 8.2 Thread Safe (TS) x64
What helped was copying the additional .dll which was in the archive - liblua.dll into the apache/bin folder.
After that it loaded successfully the extension.
Hope it helps someone :)