The iMac 27" Late 2013 cannot run any macOS newer than 10.15 Catalina.
You only option for running anything newer is to buy a newer Mac.
The new Mac mini is extremely capable and performance will blow away the 2013 iMac. The Mac mini and an inexpensive monitor are all you would need to buy since you have the keyboard and mouse for the iMac.
If cost is a consideration, you might take a look at Apple's refurbished offerings here:
Refurbished Mac Deals - Apple
You might also look at used offerings from OWC/macsales and MacofAllTrades.
Avoid eBay, Craig's List, OfferUp, LetGo, etc. A Mac that has not been properly prepared for sale can easily become a door stop.