Hi. I don't think it's related to other applications and it's not always the internet connection.
The reason may be in the hosts file, If this file is corrupted, it can lead to a connection error. How to fix this problem can be found here https://www.helpwire.app/blog/teamviewer-not-working/ Also, your firewall or antivirus security software may be restricting Internet access for TeamViewer. TeamViewer may not work with IPv6, so disable it and try connecting TeamViewer again. All of this is described in more detail in the article above.
The reason may be in the hosts file, If this file is corrupted, it can lead to a connection error. How to fix this problem can be found here https://www.helpwire.app/blog/teamviewer-not-working/ Also, your firewall or antivirus security software may be restricting Internet access for TeamViewer. TeamViewer may not work with IPv6, so disable it and try connecting TeamViewer again. All of this is described in more detail in the article above.