Method 1. Using Yoast SEO
Yoast SEO is the most complete WordPress SEO plugin. It handles the technical optimization of your site & assists with optimizing your content.
To remove category in URL WordPress with Yoast SEO, just follow steps:
Step 1. Install and Activate Yoast SEO
Then SEO > Search Appearance
Step 2. Click on Taxonomies
Step 3. Scroll down and click on Remove > Save changes
Method 2. Using No Category Base (WPML) Plugin
Install No Category Base (WPML) Plugin
Then Activate plugin
The plugin requires no setup or modifying core WordPress files and will not break any links. It will also take care of redirecting your old category links to the new ones.
And you do not need to do anything. Just activate, the plugin will do the rest.