Cars built before the 2018 MY used an older battery technology, which has been prone to premature degradation. Some of those will have been given replacement batteries under warranty. The replacements have, for some time now, utilised the new technology cells, which are proving pretty robust. Mine has done about 45k milesfrom new and still shows 102% State of Health (that is 102% of the 30kW nominal capacity).
To test before buying, you would need to buy the Android app SoulEV Spy, and a bluetooth dongle which plugs into the OBD connector in the interior fuse panel (Konnwei KW902 is recommended). Use an Android phone or tablet. That will allow you to read the SoH. Alternatively, take the car to a KIA dealer and get them to give you an SoH readout. Warranty replacement is granted when SoH (as read by the dealer) is below 70%. The procedure for reading the SOH is given here https://www.tsbsearch.com/Kia/PS548
. It is important it is followed correctly - the BMS must not be updated or reset prior to reading the SOH.