If you all you need is SMTP relay then consider IIS Server with SMTP added or an Edge role server ( that isnt subscribed to an AD domain)
Having said that, keeping the existing the Exch Servers is fine as well. To set to allow relay follow this and ensure that the Exchange Servers ARE NOT accessible outside of your network on port 25, that would be really bad.
Note, if you are still syncing from on-prem to Azure, you can not remove that last Exchange Server regardless unless you follow specific steps and are at the latest Exchange 2019 CU
https://learn.microsoft.com/en-us/exchange/decommission-on-premises-exchange