Question Why do some of my games Fps lag and some don't on my newly built computer?

May 5, 2020
I recently built a new computer (January 2020) and some of the games that I play lag and some don't, I can't seem to figure out a correlation between the game that lag because some are difficult to run and some are very easy.

The games that I lag in are:
League of legends
Apex Legends
Bioshock Infinite

Some game That i don't lag in are:
Dark Souls 3
Borderlands 3

They lag on any graphics setting (low to very high) the same amount. It doesn't matter what the setting are the lag still happens. It seems to be when I move my mouse mostly. That game runs fine if I don't move my mouse. For instance, In bioshock the game runs and looks fine if I don't look around (even if walking around), but as soon as I move my mouse it lags

I ran the benchmark in Bioshock Infinite on ultra and it performed really well, averaging around 100 to 200 frames. No lag at all in the Benchmark. But in game it stutters

All my drivers are up to date. I use geforce experience to install drivers and set graphical settings

Here are my specs:
CPU: Intel(R) Core(TM) i7-9700k Cpu @3.60ghz *8 core processor
GPU: NVIDIA Geforce RTX 2060, and Intel(R) UHD Graphic 630(this is integrated graphics and I am making sure that all the game are running off the 2070)
Memory: 32 gbs of DDR 4 ram (can provide more if needed)
Motherboard: ASrock Z390 Phantom Gaming 6

Computer Is not overheating, I had a problem with that in my last one, Air is cold-Room temp when coming out of the computer (even if gaming for a while)

I did have a problem with my motherboard, My Computer wouldn't boot so I had to bring it to best buy, they told my my motherboard was fried so i bought a new one (old motherboard was a ASrock z390 phatom gaming 4) and that seemed to fix the problem, Except for the lag.

I am open to give more information.

I also don't know if it is a hardware or software problems. The computer runs great except on those game. I may lag in more but i have only found these ones. But I know that I shouldn't lag in league of legends. I had it on my old computer and it ran fine(old computer was significantly worse).

May 5, 2020
make and model of the psu?
ssd or hdd?
did you fresh os install on January 2020 when you build the system?
I have a 600w EVGA Gold Power Supply, (The computer recommended an 800 W power supply but I already had this one and I don't think that it is too low but maybe)

My Storage Devices:
SPCC M.2 PCIE SSD 512 gbs
ST31000528AS Seagate Barracuda 7200.12 1TB 7200RPM SATA 3Gbps 32MB Cache 3.5-inch Internal Hard Drive
WD Blue WD10EZRZ - hard drive - 1 TB - SATA 6Gb/s

I took these 2 hard drives from my old computer but I wiped them (Successfully I hope) and reinstalled windows for this new computer.

I don't need to keep any files on this computer and I have a windows flash drive so I can reinstall windows if needed.