I am writing this as a Mac user and I have a feeling this may apply to PC users as well.
Unreal Engine requires a lot of CPU, GPU and memory to run efficiently, so it goes without saying, that regardless of your hardware, you will want as much of this available while working in the editor.
Everything, and I mean everything your computer is running, has the potential to eat away these precious resources, including your utility bills for electricity.
Step 1 - Clean up your hard drive. Over two years period, my Mac had accumulated dozens of gigabytes in the cache. Daz Studio alone, which I used for like a day, had 6GB stored in the cache, even after uninstalling it. MacOS has the Disk Utility for that, as well as Storage to get rid of large files. We used to defragment our drive in the old PC days.
Step 2 - Remove everything from the Desktop, at least on Mac.
Step 3 - Disable as many login items/apps as you possibly can. - These can be seen in the Activity Monitor on Macs and I believe it is called Task Manager on Windows.
Step 4 - Close down all browser windows. And by that I mean, actually close down the browser software and only open it when you need it. Discord and Reddit can easily consume hundreds of megabytes, even close to a Gigabyte, each. Extra: Google Chrome is especially hungry for RAM.
Step 5 - Close down all other applications to avoid background processes. The EPIC launcher itself uses around 176mb on my Mac.
Step 6 - Do this only if it really makes sense: Make a backup of everything that is important and store it somewhere temporarily. Then, do a full factory reset of your system, down to reinstalling the operating system. Word of warning: macOS Monterey demands Xcode 13, which is unsupported by Unreal at the moment, which will require two version of Xcode, with a total of 60GB hard drive space required.
Step 7 - Disable all fancy OS operations, like animating the minimising of windows.
Step 8 - Learn how to optimise the Unreal Engine editor itself. There is a console command called Stat Unit. It will display a few interesting things. I tested a totally blank project with nothing but a pitch black level. My FPS went from around 60FPS to around 340FPS. I can’t guarantee anything here with actual things running in the project you are working on, so a lot of packaging and testing will be required along the way to find the right balance for your project. To see Stat Unit in a packaged project, open up the level blueprint and on Begin Play, drag out a node called Execute Console Command and type in the string Stat Unit.
If you have anything useful to add, please reply so we can gather necessary information and feel free to correct me if there are better ways.