According to Consumer Reports, the only Mazda 3 from 2014 to 2021 that is rated much worse than average for reliability is the 2019. You'd be better off with a 2018, which is rated much better than average, overall. In fact, the years that are rated much better than average are:
The 2020 is rated average.
Keep in mind that some of the earlier ones allow more road noise to filter into the cabin. I think Mazda started to add more sound insulation in 2018 but I am not certain.