"The Book of Boba Fett" episode one explains that Boba escaped the monstrous Sarlacc pit due to his Beskar armor keeping him from being crushed or melting inside the Sarlacc's stomach acid.