How can I paint foliage onto a static mesh using a mask?

I also wanted to do something like this so can spawn the foliage on specific spots in case you find solution please reply to this