I find the default dig output too noisy when I only want the records. Two flags remove everything except the part I care about.
dig +noall +answer example.com A
dig +noall +answer example.com MX
+noall switches off every section of the output and +answer turns the answer section back on. You keep the full record lines with name, TTL, class, type and data, which +short drops. That makes the output easy to paste into a ticket or to pipe into awk. Put the flags in this order: if +answer comes before +noall, it gets switched off again.
Further reading: dig manual page
Going deeper: Guide: dig for beginners, look up DNS records and read the answer