Yes, you can host your website or email with a separate provider.
However, there are several reasons why you should keep them in one place. For one, you don’t need different accounts to manage your domain and hosting. And you can always contact a single provider for assistance.