I have always been confused about this. I have a newer 2021 Mazda 3 as well that's still under warranty. If I take it to a general mechanic for regular maintenance instead of dealership, do I void my Mazda warranty?although i totally agree and did just that, do remember that it isn't quite so simple elsewhere in the world. you guys have this wonderful magnuson-moss warranty act that effectively protects your warranty and gives you legal rights to that warranty even when doing DIY maintenance. everyone else isn't so lucky. it's quite the grey area here so it's entirely possible that one could be denied warranty for DIY. even that isn't so simple, for us there's the consumer protection act but it's not very clear on specific matters like this.
this was one thing that pulled me in for mazda. their warranty clearly states that you can do your own maintenance and how to document it to maintain that warranty. at least it was like this when i bought my car 8 years ago...others don't tell you what documentation is expected for DIY but the warranty does not specifically prohibit DIY. it's all very murky.
in fact this is one shady tactic dealers often use to get your business. the not so great ones will tell you that you need an expert for everything and anything else will immediately void the warranty, tear the fabric of space-time and make baby jesus cry. the one i got my car from isn't so bad. one guy tried to tell me i didn't have a warranty because i DIY. i may have told him to do his job and go read the warranty document...after which time i still had a warranty and he didn't want to talk to me.