How to force macOS to open https://t..me/ links with correct Telegram client

t.me page tries to open the URL with tg:// protocol. You need to change the protocol handler for the same.

See https://superuser.com/questions/548119/how-do-i-configure-custom-url-handlers-on-os-x/548122

In the following file, find the item with LSHandlerURLScheme as tg and change its LSHandlerRole to what your intended Telegram's Info.plist specifies.

~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist

You can probably changed the protocol handler for tg:// using SwitftDefaultApps, which can be downloaded from here, or installed via Homebrew:

brew install --cask swiftdefaultappsprefpane

Then, simply go into the "URI Schemes" tab, locate tg://, and change the viewer to be what you desire. If the application you want does not show up, select "Other", then navigate to the desired app path using the cmd+shift+g shortcut to open the "Go to Folder" feature within the selection window.