Theoretically it might be possible to do embryo arks where you would send machines to a new habitable planet and they would travel for hundreds of of thousand of years then build everything up and then artificially bring humans back to life.
Whilst this obviously has an enormous amount of challenges, we don’t know a physical law that is not allowing that.
Imagine what we do now and what we do in 100.000+ years when we face extinction.
We might also just blow us up, even though I think extinction is very unlikely
Practically an embryo ark