There’s actually an emergency Soyuz reentry capsule docked to the ISS that can carry 3 people back. This is usually reserved for a medical emergency, and replaced every six months, so the Russians say. A bit sad how the Russians have pretty much taken over the ISS since Obama slashed NASA’s programs.
Shuttles could have kept going longer, he stopped it on purpose.