坂 and 階段: a sloping path and a flight of steps
Compare a sloping route with stairs, separating step counts from floor counts and allowing both structures along one route.
A path with a slope
坂, read さか, means a sloping path or road. 駅へ行く道に急な坂があります。 says that there is a steep slope on the route to the station.
坂を下って店へ行きました。 says that someone went down the slope to the shop. 下って gives the downward direction; 坂 itself does not mean only a descent.
Using steps to change height
階段, read かいだん, means stairs. 入口の横に階段があります。 locates stairs beside the entrance.
階段を三段上がりました。 says that someone went up three steps. 三段 counts steps rather than building floors, which can be counted with 階 as in 三階.
A slope and stairs on one route
坂の途中に階段があります。 says that there are stairs partway along the slope. A route can contain both, so do not treat them as mutually exclusive place names.
坂道を歩いた後で、建物の階段を上がりました。 says that someone walked along the sloping road and then went up the building’s stairs. Read the outside route and building structure in order.
Does 階段を三段上がりました。 mean going up three floors of a building?
Show the answer and why
No. It says that the person went up three steps. Distinguish 三段 from 三階 for three floors.

