Draw without going beyond the outline of the layer

I’m writing through a translator, so I’m not sure if it’s clear, sorry.

Before I painted only in Paint Tool Sai, there was a function with which you could paint a layer without going beyond its limits. I can’t find it here, or is it just not there?

you can use the Lock alpha