Volume Material Domain Masking

Hello, i want to make a masking object inside a fog material that can move with the player, but i don’t know how to add a mask for the volume material domain since the opacity mask part is greyed out, in short i want to mix these 2 tutorials together
this:

and this: