You set up A records for your web site and MX records for your mail service.
I.e.
example.com SOA some.soa.admin numbers numbers ....
example.com NS ns1.bdm.microsoftonline.com
example.com NS ns2.bdm.microsoftonline.com
example.com A 192.0.2.5 ; web server IP address
example.com A 192.0.2.6 ; another, the load in general will be split between them
example.com MX 10 mail.service.dns.name ; this server will serve an incoming
; mail for a domain
example.com MX 20 backup.mail.service ; backup server with higher number will
; be lower priority, so it'll be used if
; all more preferred servers are unreachable
in this example zone, mail.service.dns.name (and backip.mail.service if mail.service.dns.name is unreachable) will be used by all remote mail transfer agents to deliver all email for anything@example.com . How you will access that mail depends on details of the service provider running mail.service.dns.name and backup.mail.service . Ask them for explanation, they will tell you how to access it by web or how to configure mail user agent to access and send it via IMAP or POP3 and SMTP. In general, this doesn't require you anything else to configure into your zone, just the receiving service, but read further.
https://example.com will be served by 192.0.2.5 or 192.0.2.6 (a half of requests by one of them and the rest by another). There you run a web server and put your web pages. That web server has to be configured to server example.com domain (virtual host). If you use some shared hosting service for serving website, you need to configure example.com name there, and how to do that depends on that service. Then you specify their web servers addresses in your zone.
I added two records of each kind, but there could by any number of them. If there is no MX, the mail will be delivered to A record address (192.0.2.5 and .6), this is the only special case. If there is only one A record, that server will receive all requests. There could be also AAAA records, where you specify IPv6 addresses. IPv6 clients will then be able to access your site.
If you want not only example.com, but also www.example.com, add another record(s):
www.example.com A 192.0.2.5
Or, subdomains could be served by another servers
news.example.com A 192.0.2.10
Each subdomain has to be configured as part of some virtual host on the web server. Same vhost can serve a bunch of subdomains, or different vhosts can do different subdomains, as you wish. Then those will be independent sites.
Your mail service provider can also provide a way to use your domain name to access your mail. This is usually done by uning a "canonical name" type record
mail.example.com CNAME webmail.service.dns.name
Also, to better protect you from rejecting your mail as spam, they could suggest you to add a DMARC TXT record
example.com TXT "...."
In case you want to run your own mail service:
example.com MX 10 mx1.example.com
mx1.example.com A 192.0.2.100
example.com TXT "..."
mx1 is just a system name here, you can use anything you like, but what name you specify in MX record should be an A record or AAAA record with receiving server IP address.
Hope this helps.