I use pfSense for my firewall/router and before that Linux. Both are updated frequently. While the WRT based routers are more likely to be updated, even they have problems. For example, I have an old Linksys WRT54GL router, which I installed DD-WRT on. However, because that device is so old, there haven't been updates to any version of DD-WRT that will run on it for years. Because of this, I only use it for testing, etc.. I would not use it as my main firewall/router. I even have a Cisco router that I would not use for my main router, as it hasn't had any updates for years.
This could more accurately be titled "avoid cheap routers." Higher end consumer routers like Netgear's Orbi, Amazon's Eero, and Google's Nest Wifi are updated regularly and are still friendly to your average consumer, who will never be comfortable configuring DD-WRT or building a custom Linux based routing solution.
Asus routers are regularly updated as well. In addition, there is the third party firmware called Merlin which adds features and security fixes, often ahead of the official Asus firmware. The Asus firmware is as easy to update as going to the administration firmware tab and clicking on update. None of that download the firmware and manually installing it crap. An entire AiMesh configuration can be updated by simply clicking on update on the main mesh node.
I have seen some popular name brand routers that don't get updates. I purchased one of the top rated but cheaper name brand routers some time ago and noticed that the firmware was 2 years old and no update was available. There had been security holes discovered during that time. It was obvious they did little or no firmware development or support. Got rid of that in a hurry.
That's when I decided to make a PfSense router out of a lightweight PC I was no longer using. I've since installed a lower power CPU and switched to OPNSense. No consumer grade router comes close to the capabilities of PfSense or OPNSense. Software support is better as well. For wifi, I use Asus routers configured as access points in a mesh network.