C++ Slow build times

For a while I have had a huge issue which has been bugging me for a while now. I have looked everywhere for any solutions but I haven’t found any. So basically whenever I create a C++ new class, for whatever reason my build times go up ridiculously. So normally when I change a variable name on a script it will only take like 1 to 5 seconds to build, however when I create a new C++ class ,it takes all of the sudden like 50-100 seconds. Its only after that build the build times go back to normal (but only for that script). If I make another slight change to another script, the process will just repeat for that script. This result in this is me having to rebuild the solution in order to get normal build times back (and this process can take a while). I don’t know what is causing this issue. From what it seems, when I create a new class all the build data is getting removed. It makes sense because it is only after I do a rebuild all the scripts’ build times are back to normal. Does anyone have an idea on what is causing this? Is there a setting I must of accidentally changed that is causing this? Let me know if you have any idea on what is causing this. Thanks