Dynamic MCs and Masks

I’m creating a starry sky for a header and there are mountains in the image which obviously I want the randomly generated stars to appear behind it.

I’ve tried setMask() but I don’t see it doing anything. The generated stars still appear on top of everything regardless of layer order and such.

Thanks for any help you can give. I’m an artist, not a programmer.