fastcgi_hide_header X-Powered-By;
This works with php 8.4 +
Adding the header in the nginx config file for Laravel/php app, under the location ~ \.php$ {} block
location ~ \.php$ {}