For mask animation, you can select a layer and then right-click to select a mask layer, or you can choose the option of adding a mask layer.
You can refer to the tutorial of Flash software.
How to Animation Digital Switching Animation and Mask Animation
How animation realizes digital switching effect through shape adjustment