Also note that example.com has no MX records [1]:
When an address such as username@example.com is used to demonstrate
the sign-up process on a website, it directs the user to enter an
actual email address at which they receive mail. Example.com is used
in a generic and vendor-neutral manner.
The list of reserved TLDs is quite short actually [2] but thanks to this page I understood that ".dev" is a bad TLD that people enjoy(ed?) using for their test/local websites [3]. I have been using ".test" for all my offline projects for a couple of years now, and ".local" was specifically very helpful when I had to build a fake DNS server for a DNS manager that I was maintaining.
[1] https://en.wikipedia.org/wiki/Example.com
[2] https://en.wikipedia.org/wiki/Top-level_domain#Reserved_doma...
[3] https://iyware.com/dont-use-dev-for-development/