You need to change the reference in the nginx configuration file for librenms to /var/run/php-fpm/php7.2-fpm.sock
to the file for your new version of php (7.3, 7.4)
Also make sure that file exists. /var/run/php-fpm/php7.4-fpm.sock
or whatever version you have. Restart fpm and nginx after updating your files.