If you are using Exch 2019, you need a license for any Exchange Servers on-prem - including Edge.
If you are using Exch 2016, you can get a free license key for the server serving the hybrid enpoint
A few years ago, we created a web site that would allow our hybrid customers to obtain what’s generally known as the “hybrid key”. This self-service site would validate your O365 tenant and after a few clicks, give you the key to license your on-premises server used for hybrid purposes. This site is no longer available for use, and we’ve come up with a better way for you to get the key. We are excited to inform you we have added a feature that will allow the Hybrid Configuration Wizard (HCW) to detect and license your designated on-premises “hybrid server”, without having to go to a separate web site or call our support team. This change is now available. You can access the HCW here.
Please note that HCW does not provide a 'hybrid key' for Exchange Server 2019. If you need a hybrid key, the latest version that it is available for is Exchange Server 2016.