To create widget for categories override shop sidebar please follow these steps:
Step 1 – From Dashboard > Products > Categories > Edit categories:
Step 2 – Please build a filter for categories that you have just created: (From Appearance > Widgets)
This is our example of the categories product pages have a filter:
Video tutorial
Thanks for watching!