To remove category from your URL do:
- Go to Setting > Permalinks
- Select Custom Structure
- Add /%category%/%postname%/ after your domain
- Change Category Base to period/dot.
Read this blog https://jonnyjordan.com/blog/how-to-remove-category-from-your-urls-in-wordpress/