When I built my pc I bought 16gb (2x8) of ram. For the Christmas season I decided to gift myself 32gb (2x16). Both sets are ddr4 and run at 3200mt/s but are of different brands. Is it okay to put them in the other two ram slots or should I replace the old ones?
Yes, but they should be the same speed and latencies. I think if they are compatible and different speeds all the ram will operate at the slower speed if at all.
It’s likely you’ll find they won’t work together and the PC won’t start up, you can try switching the slots they are in sometimes that helps. Otherwise there will be no harm done, just remove the ones you don’t want to use if they end up not working together.