Why do I add height, to other parts to make the overflow:auto of adjacent parts work?

at first I didn"t write the CSS and HTML of the main area
the following code is the sidebar CSS, page effect as shown in figure 2
clipboard.png

clipboard.png
main

clipboard.png

clipboard.png

Mar.06,2021
Menu