I think you don't want to give height in pixels like 200px,
In order for overflow to work on an element’s content, the element needs to have a definite measurement, otherwise, the element container will keep on expanding to accommodate as many content elements it can have or no matter the content’s size.
But if the container element has a set height once its content reaches those limits, it will follow the overflow rule, which in case of scroll.
You can try using below code
overflow-x: hidden;
overflow-y: scroll;
height: 40vh;
(vh - Viewport Height (Auto adjusts according to browser's window size))
Hope it Helps