I kinda of ruined my control by unplugging the battery and holding the power button for a while before swapping the same memory in and out, but it fixed this HP. Thank you!
If the issue is 3 long and 2 short beeps or blinks in hp. here is how I fixed it. I had two slots with 8GB DDR4. I tried to take out both rams and put invidiual rams in both slots. First I put a normal 8 GB stick in one slot and tried turning it on. and after trying both slots one by one. It worked. So one of the slots stopped working :)
make a recovery bios usb using a bios from HP drain the power from laptop hold windows + b then press power botton wait for it to finish untill the flashing light goes. Thats how i solved mine