A scroll bar is only visible if a content is bigger than its scroll-able container.
E.g. here, the content's height is 800px but its container is only 400px:
(Please provide more context if this doesn't answer your question)
.container{
overflow-y: scroll;
width: 200px;
height: 400px; /* Half of its content */
}
<div class="container">
<img src="https://placehold.co/200x800">
</div>