Add a Crease to the Top Edges to Sharpen the Corners
Give the 4 top edges of a cube rounded by subdivision a crease of 1, so that only the top rim becomes crisp.
Starting scene demonstrated on Subdivided cube
Steps
Put the cube with the subdivision modifier in Edit Mode and switch to edge select mode.
Select the 4 edges around the top face.
Open "Hard Surface Modeling" > "Crease Preset".
Click "Open Crease Preset" in the "Execution" area.
Click the number button "1" in the "Select" area of the popup.
Follow the changes on screen
BeforeA cube rounded by subdivision.PopupThe 4 top edges are selected and "Open Crease Preset" has been clicked. The number buttons "0", "0.25", "0.5", and "1" are lined up in the "Select" area near the bottom.AfterAfter clicking "1" in the "Select" area. Only the top rim has become sharp (the colored lines are the edges with a crease).After (Object Mode)Viewed after returning to Object Mode. The top rim is crisp, while the bottom rim stays rounded.