Debian-based Ubuntu, Redhat-based CentOS, these are GNU/Linux distributions. Nginx is a cross-platform web server software that can run on Unix-like systems (such as Linux/*BSD/macOS, etc.) It can also run on Windows, or even run on Android/iOS devices after cross compilation.
Metaphor:
Operating system: a platform
nginx: an application
nginx is a program that provides web services or reverse proxy services. Those two are operating systems and are not the same category
Debian-based Ubuntu, Redhat-based CentOS, these are GNU/Linux distributions.
Nginx is a cross-platform web server software that can run on Unix-like systems (such as Linux/*BSD/macOS, etc.) It can also run on Windows, or even run on Android/iOS devices after cross compilation.