Nginx is a dedicated web server while node is a javascript runtime environment powered by V8 engine that can also create its own server using node:http
Using as a Reverse Proxy
A reverse proxy is a special type of web server which receives requests, forwards them to another HTTP server somewhere else, receives a reply, and forwards the reply to the original requester.
Reverse proxy typically will modify the request, for example, rewriting the original Host header to match the forwarded target, or changing protocol from HTTP to HTTPS.
Reverse proxy can also act as a load balancer and distribute requests to multiple backend instances.
SSL Termination
Both Nginx and Node HTTP can perform SSL termination, however Node HTTP handling certificates is more tedious and also a security risk.
Nginx can utilise certbot which automatically installs new certificates and dynamically configure Nginx process, a much less disruptive process then restarting a Node application instance. Handling certificates in Nginx also means that only code residing in Nginx has access to your private SSL certificates, however in Node this means its dependency modules will have access to your SSL certificates, presenting a security risk.
Nginx typically perform SSL encryption faster than Node and reading static content from disk is going to be faster as well.