when I rearrange the email by category it is very slow and stops continuously, how can I solve it?

If you disable conversations (Menu > View > Conversations) is there any difference?

no I tried but it crashes anyway

Uninstall the application, and then download and install the latest version of eM Client from the Release History.

I tried that too but it doesn’t change the situation

Can you provide the error from the log?

You will find that in Menu > Tools > Operations.

there are no errors because it takes so long and freezes but in the end makes me see the mails sorted by categories.
If the mail uses it without categories, it does not give me any problem, so there is certainly a problem related to the categories

Maybe it is your database. 

First make a backup using Menu > File > Backup, then close eM Client and delete the C:\Users_yourusername_\AppData\Roaming\eM Client folder. You may need to enable hidden items in Windows Explorer to get there. 

When you restart eM Client, you will have an empty database. Setup your accounts and see what happens.

If that does not make any difference you can restore your old database (Menu > File > Restore) or just keep the current one.