On 2013 A5 you’re possibly still on Euro 5 diesel? I currently have B9 A4 Allroad with 3.0 litre (272PS) engine which has more than enough power.
Your current car will be coming up for 12 years old and 85k miles. That’s nothing for a diesel, but jumping to the newer technology, plus the cost of a 2021 S5 model should be straight forward as long as the servicing for the last 4 years has been top notch. If it’s been on long service regimes, every 18k miles, then walk away.
I’ve read a few of the reviews on diesel S4 which I assume is same engine in S5 and they were very complimentary. That said, they are complicated, mild hybrid system, AdBlue as it’s Euro 6.
Obviously test drive one, but more importantly, if it’s sold via Audi franchise, then get their extended belt and braces extended warranty. If it’s sold via second hand retailer, then I’m sorry their warranties are underwritten by market and have a lot of exclusions, and are part specific, and daft inclusions such as service every 6 months or void.
Also check out VAG Technic on YouTube. Constant stream of cars in, especially B9 S4 with issues such as needle bearings on rocker arms, this is on petrol models, but they’ve had diesel SQ5 TDI that needed engine rebuild. This S5 (17-plate) petrol diesel didn’t make the cut.
S5 will have 8-speed Tiptronic gearbox, so practically bullet-proof.
Good luck with whatever you decide.