Hello,
If the URL is Businesscentral.dynamics.com, then it is cloud. If it is something else, then I don't know how you can tell, as there could be a DNS record that redirects it to either OnPrem or Cloud. But try this:
tracert sandboxexample.dynamicstocloud.com
ping sandboxexample.dynamicstocloud.com
And see if that shows you the DNS path and it may end up on someting.cludapp.azure.com, but then I am not sure if it would tell you if this is a cloud solution, or an OnPrem solution running of some Azure VMs.