Creating Sidebar
Sidebar can be created at the “Appearance > Widget” area.
Assigning The Sidebar
After you created sidebar, you can assign it to any page/post you want in the “Page Option” area. You can also set the default sidebar for blog, archive and search page at the “Customize > General” section as well.
Dynamic Sidebar
If you need different sidebar for different page/post/archive page, please use third party plugins for it.
Eg: https://wordpress.org/plugins/custom-sidebars/
NOTE: we can’t guaranteed it will work all time, so if it not work for you, please search another and check it by your self instead.