Sebastian
As announced by @alfisya , Teamviewer will be soon given up, so I uninstalled it and replaced it by AnyDesk.
However, as I was the original author of this post, and so as not to leave you alone with your question, I installed TeamViewer in a Solus virtual machine.
1/ First, using your script, I launched a terminal session to activate the daemon:
admin@admin-solus ~ $ teamviewer --daemon start
systemctl start teamviewerd.service
admin@admin-solus ~ $
Then, I ran the script, which gave me the following result, without displaying the application window, as it did for you:
admin@admin-solus ~ $ ~/programs/teamviewer/teamviewer
Init...
CheckCPU: SSE2 support: yes
Checking setup...
Launching TeamViewer ...
Starting network process (no daemon)
Network process started (9163)
Launching TeamViewer GUI ...
admin@admin-solus ~ $
2/ However, when installing the application via Third-Party Software, it does indeed launch the expected window.
This is what I can tell you about it, but I can't explain why these differences in behavior between your script and Third-Party Software.