When the mac app is running it makes an outbound connection to signaling server and registers itself under the account. Iphone connects to this same signaling server to request a connection to this mac. Once both the host and remote are verified it establishes a direct p2p webrtc connection.
Why not Tailscale + Termius? To get Tailscale + Termius working you need to: install Tailscale on both devices, enable Remote Login on your Mac, generate SSH keys, configure authorized_keys, and pay for Termius Pro. That's 5 steps before you've written a single line of code and Termius Pro costs $10/month just to sync your credentials across devices.