Do a load test on them. That is about the only reliable way to see what condition they are in. Depending on climate, etc. batteries could last 5 years (hot climates) or less or 10 years in milder climates.
On my 2004 duramax it's on it's 3rd set of batteries. OEM's lasted just shy of 10 years, Next set of Delco's 7 years, Now our son has it and has an Intersate in it.
On my 2015 at 6 1/2 years I replaced the OEM delco's with the top of the line Delco's. The OEM were getting weak, during covid the truck often sat for 3-4 weeks between starts and the were starting to have self discharge issues.