In this rule

Historical Rules · 17 November 2023

Rule 107.3h

Official source text from the 17 November 2023 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