What a server believes it exposes and what the network sees can differ. I scan my own machines from a second one.
nmap -Pn -p- --open 192.168.1.10
nmap -Pn -sV -p 22,80,443 192.168.1.10
-p- scans all 65535 TCP ports, not only the top 1000, --open prints only the open ones and -Pn skips host discovery, which helps when ping is blocked. The second line adds -sV to read service banners on chosen ports.
Compare the result with ss -tulpn on the host itself. Scanning localhost only shows loopback and proves little about the firewall. Only scan machines you own or administer.
Further reading: nmap reference guide