The Death Star's most famous weakness was its thermal exhaust port, but Star Wars has hinted the battle-station had another critical weakness that would have become clear over years. Emperor Palpatine intended the Death Star to be almost invincible, but he had not factored in Galen Erso's sabotage. Erso deliberately introduced an instability in the Death Star's reactor core, and tricked the Empire into building thermal exhaust ports that would become tempting targets for the Rebel Alliance. As seen in the first Star Wars film (later retitled A New Hope), the Death Star's thermal exhaust port led straight to its unstable reactor. Luke Skywalker was able to fire two Force-guided torpedoes down the exhaust port, detonating the reactor.
https://screenrant.com/star-wars-death-star-hidden-weakness/