It's 32mm between the mainboard and the second fan (the fan over the RAM). Or 64mm without the second fan (64mm between mainboard and heat sink). https://noctua.at/en/products/cpu-cooler-retail/nh-d15/comp
I have the NH-D14. Fan has no screws, attach the bracket on the rad fins a little higher. Old pics.
Blue RAM (52.5mm) had to be in slot 2 and 4. I had to raise the 120mm fan by 5-9mm.
Black RAM (41mm) fit well in slot 1 and 3. Fan 120mm at the original position.
You have a 140mm fan. So, 32mm height RAM should fit well.
The NH-D15 is wider than the NH-D14, not taller. https://noctua.at/media/blfa_files/infosheet/noctua_nh_d15_datasheet_en_1.pdf
Beware of the total height of the heat sink/fans assembly. I had to remove the deflector of the side fan of the Cooler Master HALF X. The case should be thick.