Is it the same pc you are playing on or a different one?
If it is the same PC: Can't connect to the dedicated server I'm hosting & Can't join local dedicated server unless I start the game first
If it is another PC in the same local network, use the local IP to connect to your server instead of the external one.