Why can't you use a CNAME at the zone apex?
BeginnerConceptDNS
Answer
A CNAME says "this name is an alias for another name" and cannot coexist with other records at the same name. The apex (example.com) must hold SOA and NS records, so a CNAME there would break the zone.
Providers solve it with ALIAS/ANAME or Route 53 alias records, which are resolved on the server side and return A/AAAA answers. In Route 53, alias records to AWS resources are free and follow IP changes automatically.
More on DNS
What does DNS do and what happens when you type a URL into a browser?BeginnerWhat are the common DNS record types?BeginnerWhat is the difference between a recursive resolver and an authoritative server?IntermediateExplain the DNS resolution chain step by step with dig.IntermediateWhat is TTL in DNS and how does it affect changes?BeginnerWhat is negative caching in DNS?Intermediate