Such changes can result in having to reinstall Windows. Microsoft has been very unsupportive of such changes and if you have the OLD CPU you might go back to what worked then try another method from this google:
I can guess you'll write you only changed the CPU. Sorry folk but the CPU now has a lot of what used to be on the motherboard so the same ideas apply here.
I just upgraded my CPU from a Ryzen 5 1600 to a Ryzen 7 2700x and all was well until I found out it was only running 6 cores. I downloaded Ryzen master and reset it, which allowed me to select 16 cores (8 really) from msconfig, which then prompted me to restart, so I did. This went to the error and restarted into boot manager. It does this over and over. I have had this problem many times before, and usually what I would do is go into the repair options after the error and reset my hard drive as I have nothing valuable on it, but this time I can’t get to the repair options at all. I go into bios to select my boot drive and my SSD isn’t there but my hard drive is, with the primary boot drive being Windows Manager from my SSD. I also updated my BIOS right before this started happening, but then I tried to do it from the internet and it said it was up to date, so I don’t think it’s that.
Note - I have had this problem before when upgrading RAM/CPU and resetting the hard drive, but like I said, that isn’t an option.
Specs - GTX 1070
RYZEN 7 2700X
500GB SSD/1TB HDD
ASUS PRIME B350 PLUS
16GB 2666MHZ CORSAIR VENGEANCE