How to set CustomStencil in material instance instead of on a component or mesh

Because importing assets by component or by mesh would make the initial asset import process particularly cumbersome, I would like to know how to set CustomStencil on material instance.

I found some articles in the Chinese community, but since the article is not aimed at beginners, I don’t quite understand it. So I’d like to ask if there are more detailed tutorials suitable for beginners?

https://zhuanlan.zhihu.com/p/706891616

https://zhuanlan.zhihu.com/p/844165353