How to calculate the probability of picking a smaller value than $X$ within $N$ attempts. Where $0<X<2^{256}$ and $1,000,000 < N$
Each attempt got $2^{256}$ options, duplicates allowed.
This question is an analogy for calculating what are the chances of mining a bitcoin block with hash power of $N$ and difficulty $X$
Taking your inequalities as strict, each hash has a probability $p = \frac{X-1}{2^{256}-1}$ of being successful. Since they're independent, the probability of being successful at least once is one minus the probability that none of them is successful, or
$$ P(\text{at least one success in $N$ tries}) = 1-(1-p)^N $$