The nginx package can be removed with the following command:
nginx
$ sudo dnf erase nginx
If there is no need to make the web server software available, removing it provides a safeguard against its activation.