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.
You should mix them the same way across channels. Like, put the 16s in the first slot of each channel and the 8s in the second slot of each channel. Not for compatibility reasons, but for performance. If you put both 16s in one channel and both 8s in the other, it may not perform as well, because the CPU might run them in single channel mode.