Sticky header that shrinks

Hi, curious if there are any tutorial on how to set up a sticky header that shrinks on scroll? 🤷🏻‍♂️

Preferably that it works well with laptop. 👨🏻‍💻 And also with mobile. 🤳🏻