In all likelyhood we will continue to use it beyond 2024, that's not a "hard" retirement date, it's a "let's look at the program and funding" date. Case in point: the B-52 is well past its original retirement date.
The biggest difference being that the B-52 is a fleet, not a single vehicle, and all of them are accessible for routine inspection, maintenance and upkeep. The ISS was designed to be as light as possible, while meeting all requirements for that design life, and it can't be checked or have major structural items swapped out on-orbit. So, there is a hard retirement date for ISS, based on structural fatigue. Every time a visiting vehicle docks or undocks, it takes a little bit of "life" from ISS.
If you saw the movie "The Martian," and didn't understand why his habitat suddenly exploded one day, this was explained clearly in the book; he used the door too many times! NASA makes its hardware "just strong enough" for its intended purpose, with appropriate margins of Safety.