You can follow three steps for solution
1) Go to settings > permalinks
and change the permalink as plane or default then save it.
2) Now Go to your site home page and refresh your home page. Now check the category pages.
3) Now go again settings > permalinks
and now change it /%category%/%postname%/
And now go to home page refresh it and check your category pages
Hop it’ll help you.