2012 Macs are still supported with Catalina, maybe next version will be the last for 2013 Macs.
I think you can expect 2 more years of macOS system upgrades support (plus about 3 more years for THAT OS to run out of security updates.
As the 2013 is still a practical system, I would make sure that it doesn't have just the basic hard drive, and you could also consider replacing even a fusion drive with a pure SSD. Prices continue to come down for SSDs, and the difference (particularly compared to a spinning HDD) is dramatic.
Just my opinion 😎