Hard Edges On Corners
Select the edges that should be sharp and use Shift+E to adjust the Edge Crease. This controls the weight used for the edge by the subdivision surface modifier. Alternatively you can also control the value in the sidebar. Open the sidebar with N > Item > Transform and change the value for Crease.