https://windupstories.com/books/pump-six-and-other-stories/
Also I guess Silo / WOOL by Hugh Howey is perhaps closer to what you wrote literally but probably not quite the vibe maybe.
In general, you should look into the ‘solarpunk’ genre, especially post-apocalyptic solarpunk.