Ungodly slow compile time

I just started learning c++ in unreal, but my problem is this ungodly amount of time that visual studio takes, to compile. Even if i create a fresh project, adding the first two lines of code and some includes, makes to compilation time to go to about 15-20 minutes. My pc is quite bad, but is it that bad though?
GTX 75O Ti
Pentium G4400
8 GB ram

Yes. The CPU is insanely slow compared to modern workstation setups, 8GB ram is nowhere near enough, and your setup likely also still involves a HDD.

On a modern setup, building simple projects only takes a couple seconds.

This CPU only has 2 threads. Workstations these days have at least 16 or 32 threads and since compiling works in parallel you are at a huge disadvantage with just 2 threads.

For example, here is that CPU compared to one that is currently quite popular as an entry workstation CPU: Intel Pentium G4400 @ 3.30GHz vs AMD Ryzen 9 5950X [] by PassMark Software

… that is a 7 year old processor with the specs of one that is closer to 16 years old. Frankly, it’s awful. My 10 year old machines have much much higher specs, and are pretty awful to do modern development on.

With 2 cores, only 8 gig ram, and probably hard disks instead of solid state, you’re going to be in for a lot of waiting.