But the bios is showing both slots available rams 16gb the problem is on Windows maybe
Type into Windows search msconfig and open msconfig. If msconfig doesn't come up, type run into search and open the program called Run. Then type msconfig into Run to open msconfig.
In msconfig go to the Boot tab and then click the Advanced Options button on the middle left. A small window will come up called Boot Advanced Options. Make sure that Maximum Memory is unchecked and then click ok to close and reboot if you had to uncheck it.
If it's already unchecked, you need to pull out and reseat your ram modules to see if that fixes the problem instead, otherwise there is a chance your ram, motherboard or CPU may have a defect. It's possible a pin got bent or broken when installing the Ryzen 7 or it might have already been defective.
Edit - You might also need to reset the bios if you didn't do that after installing the Ryzen 7.