Please open the WordPress Customizer and navigate to Site Header > Header, find Sticky Header option, and choose Always sticky or Sticky when scroll up.
And then find Select Sticky Header option and select a header from the dropdown to be the sticky header.
The sticky site header can be the same as the normal site header, or you can create a separate site header to use as the sticky header, so that the sticky site header can have a different background color or even different content.