Run the following in powershell

Test-NetConnection -ComputerName HOSTNAME -Port PORT

Something like the following will be the output. TcpTestSucceeded is the output you should be concerned with.

ComputerName     : google.com
RemoteAddress    : 142.250.191.142
RemotePort       : 80
InterfaceAlias   : Wi-Fi
SourceAddress    : 192.168.1.5
TcpTestSucceeded : True