Freeze first Line method:
First select the first row, select the View menu in the menu bar, and then select the frozen first row in the drop-down triangle of the frozen pane.
The effect is as follows: Drag the vertical scroll bar
To freeze the first column method:
First select the first column, select the View menu in the menu bar, and then select the frozen first column in the drop-down triangle in the Freeze pane.
The effect is as follows: Drag the horizontal scroll bar
Freeze first and first columns:
To freeze the first and first columns, first select the B2 cell (that is, the intersection of the first and first columns), and then, in the menu bar, select the View menu.
Then select the Freeze Splitter pane in the Freeze pane drop-down triangle.
The effect is as follows: Scrolling horizontal/Vertical scroll bar
How Excel freezes the first or first column and first row columns while freezing