You can actually mount it either way, but generally vertical (|| in your example) is the way to go. The RAM cutouts on the cooler are designed for vertical mounting and you'll see the entire cooler is offset slightly too. Noctua call that "Asymmetrical layout". When you mount it vertically you'll find it's offset towards the top of your case. That makes the cooler less likely to infringe on the first PCIe slot.
You can actually mount it either way, but generally vertical (|| in your example) is the way to go. The RAM cutouts on the cooler are designed for vertical mounting and you'll see the entire cooler is offset slightly too. Noctua call that "Asymmetrical layout". When you mount it vertically you'll find it's offset towards the top of your case. That makes the cooler less likely to infringe on the first PCIe slot.