JSFiddle - React, Tailwind, and code Playground

HTML

<div class="Icerik">
<div style="height:200px">

</div>
  <div id="Sabitlenecek">SabitlenecekDiv</div>
</div>

CSS

.fixed {
    position: fixed;
    top:0; left:0;
    width: 100%; }
    
    #Sabitlenecek {
    width:700px;
    height:50px;
    background:orange;
    postion:fixed;
}
.Icerik{
  height:5000px;
  
}

JavaScript

$(window).scroll(function(){
    if ($(window).scrollTop() >= 200) {
       $('#Sabitlenecek').addClass('fixed');
    }
    else {
       $('#Sabitlenecek').removeClass('fixed');
    }
});