Threat of early delivery

Has anyone been kept in the hospital for threatening of early delivery? Did they keep you for the rest of your pregnancy? 😭😭 I'm barely about to be 23 weeks and already 2cm dilated and that's with stitches on my cervix. Any experiences much appreciated. Doctor said she didn't know for how long I would remain admitted but that their goal was to keep me pregnant as long as possible.