Networking basics: ip, ss and dig
Three small tools answer most "why can't I connect?" questions.
Addresses and routes
ip addr lists interfaces and their addresses, and ip route shows where packets go. The line starting with default is your gateway.
Who is listening?
ss -tlnp prints listening TCP sockets with the owning process. Swap t for u to see UDP.
Name resolution
dig example.org asks DNS directly. Add +short for just the answer or @9.9.9.9 to query a specific resolver. If dig works but the browser does not, the problem is probably not DNS.
Testing a port
nc -vz example.org 443
curl -I https://example.org/