Different methods for different websites
1. For Custom HTML & CSS Website
To make header sticky put a class name "sticky_header"
in your header / nav / div and write the following code in your CSS file.
.sticky_header
{
position: fixed;
top: 0px;
width: 100%;
}