As a first step, please restart Steam and disable any VPN you might be using.
If that doesn’t help:
- Open Windows Defender Firewall
- Click on Advanced settings
- Click on Outbound Rules and then press on New Rule on the right panel
- Select Program from the Steps menu and press on Browse… on the right panel
- Find the .exe of the game and double click on it (most commonly on C:/Program Files (x86)/Steam/steamapps/common/game name/game name.exe)
- Press Next > and select “Allow the connection”
- Press Next > and keep all boxes ticked
- Press Next >, name your rule, and press Finish