Run following commands
$ sudo apt update
$ sudo apt install libgmp-dev -y
$ dpkg-query -L php8.2-gmp
$ cd /opt/lampp/lib/php/extensions/no-debug-non-zts-20220829/
$ cp /usr/lib/php/20220829/gmp.so .
$ chmod 755 .
$ /opt/lampp/lampp restart
and then make a changes in php.ini
vi /opt/lampp/etc/php.ini
with following lines
extension=gmp
and then
sudo /opt/lampp/lampp restart