How do I create a procedural mask for mountains texture?
Why not use object Z coordinates? You can use a ColorRamp or Greater Than node to control where the cutoff point is:

You mention in your question that the node setup in the video you linked doesn’t work for you, but you don’t mention why, so if this approach doesn’t work for you, either, please add more details to your question.