Good question, In my experience, I usually pass the mask as an additional argument into whatever application I’m using. For example, when I use nistats (soon to be incorporated into nilearn), I pass the mask file as an additional argument into the FirstLevelModel class.
Here is another answer for a question about handling outputs from fmriprep
The answers to those questions apply the mask output from fmriprep during their analyses, so you can take a look there to see further examples.
However, this is dependent on what workflow you are using, so I cannot speak broadly.
Does that help?
James