First idea:
You can create custom widget which will inside it’s displaying logic contain your necessary conditionals check to display only necessary or variable content, utilizing is_category()
conditional. Check oficiall widget’s docs and tutorial https://developer.wordpress.org/themes/functionality/widgets/
Another idea:
You can use filter sidebars_widgets
inside which you’ll remove unnecessary widgets out of being rendered based on your conditionals. See more info at https://developer.wordpress.org/reference/hooks/sidebars_widgets/
Approach with custom widget will be more universal as with it you’ll be able to render it exactly the way you want. And filtering sidebars_widgets
is more suitable for cases when you need to remove\hide certain widgets for example when user is logged in or not.