bitcoin core keeps a cache of the UTXO set in RAM for fast access.
iirc, there are 94M UTXOs currently. gonna take a hell of a lot more than 1M UTXOs to cause a spike in ram. also, the max number of outputs you could create in a block is something like 13k (back of the napkin math)