In this rule

Historical Rules · 22 April 2021

Rule 107.3h

Official source text from the 22 April 2021 Rules release

Permalink

If an effect instructs a player to pay an object’s mana cost that includes {X}, the value of X is treated as 0 unless the object is a spell on the stack. In that case, the value of X is the value chosen or determined for it as the spell was cast.

Find this number in the current Rules