kerokerokipper If you're still looking for help with this, let me know. As mentioned above, there's no way to entirely prevent lag, framerate drops, or other performance issues, even on the most expensive hardware available. The game engine has its own issues.
However, you can help yourself immensely by getting a processor with a high clock speed. More cores aren't going to help beyond six, unless you're heavily multitasking, because Sims 4 can only use four. So the speed of the cores matters more than the number. But absolute clock speed isn't the best metric—you'd need to consider AMD vs. Intel and the particular generation, with newer CPUs getting more done per clock cycle than older ones.
Something like a Ryzen 7 7800X3D (currently $400 on Amazon) would be an excellent choice—when it was released, it was the second-best option for gaming, only a couple percentage points behind the much more expensive 7900X3D. I doubt the latter or the newer 9800X3D would make a difference to Sims 4.
DDR5 memory is going to help, and it's the only option with the above CPUs, but if you go Intel, make sure you get a DDR5-compatible motherboard. You don't need more than 16 GB RAM for Sims 4, but if you want more, that's not a bad thing. Above about 6000 MT/s, the first-word latency matters more than the absolute speed.
For the graphics card, Sims 4 won't benefit much, and probably not at all, from anything above an RTX 4060, unless you're playing at a high resolution AND a high refresh rate. Even my RTX 2070 has never been maxed out in the game. On the other hand, if you want to play other, newer games too, they may benefit from a faster GPU.
For storage, any NVMe SSD from a reputable brand is not going to be maxed out under any Sims 4-related load. So figure out how much storage you need and buy one or two drives that fit. Even a (significantly slower) SATA SSD would be fast enough for Sims 4, but they're typically not much cheaper than NVME drives these days.
Aside from that, don't cheap out on the motherboard, and absolutely do not get a low-quality power supply. A bad PSU can wreck your entire computer, literally.
If you put together a parts list, or you find a prebuild that you like, feel free to link it for a second opinion. As far as pcpartpicker is concerned, I wouldn't absolutely trust every detail on the site, but it's at least good about the big picture, for example not listing DDR4 memory for a CPU or motherboard that only supports DDR5, and vice versa.