when you are only considering hardware performance, old flagship wins by landslide. considering software especially getting updates, new phones will have the edge on that matter cause samsung may finally stop support for older phones at some time. also worth considering is the battery efficiency. old flagship maybe good performance devices but it is not as efficient as newer chipset of Midrange phones. the battery capacity is not that great on older phones too.
more poeple gonna choose latest midrange phones over old flagship phones, 1. the benefit of 2years software upgrade and security patches. 2. midrange phones are not as good as flagship phones but its good enough for daily use like social media, talking photos even playing games.
I will recommend latest midrange phones released by 2020 or late 2019 over 2year old flagship phones