JSFiddle - React, Tailwind, and code Playground

HTML

<div class="scroll-container">
    <div class="container">
        <h1>Header</h1>
        
        <p>asdfg
        <p>asg
        <p>asdg
        <p>dsag
        <p>asdg
        <p>adsg
        <p>adsg
        <p>adsg
        <p>adsg
        <p>asdg
        <p>asdg
        <p>asdg
        <p>sdg
        <p>adsg
        <p>adsg
        <p>asdg
        <p>asdg
        <p>asdg
        <p>as
        <p>dgasd
        <p>gasdg
        <p>adsg
        <p>asdg
        <p>asdg
        <p>asdg
        <p>adsg
        
    </div>
</div>

CSS

.scroll-container {
    height: 300px;
    overflow-y: scroll;
}

.container {
    height: 1000px;
}

h1 {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    width: 100%;
    background: black;
    color: white;
}