Sorry about the poor experience. Could you let us know which version of After Effects you are currently using? Also, please share your system specifications (OS, OS version, CPU, GPU, RAM). Do you see this issue while collecting files for specific or all projects?
After Effects 22.6 has been released with a fix. It’s a phased rollout so you might see the update by the end of this week. Try updating your After Effects once the update is available and see if it works any better.