You probably want to use Object / Clipping Mask / Make – Where a copy of the purple shape is the clipping mask.
On the purple shape..
Use Copy, Paste in front (Cmd + C, Cmd + F).
Then Bring to front (Cmd + Shift + ])
Next, with the new purple shape selected, shift-select one of the other internal shapes, or all of them, and make a clipping mask.
You can search the forum for Clipping Mask for more info.
You could alternatively use a Pathhfinder approach. Instead of masking the shapes, you can cut them to the precise size.
Do a search for Pathfinder, here on the forum, if that sounds like something you’re interested in.
Vince
*Please remember to Rate our replies or check Solution if solved. If you get a good idea from the post, consider clicking the Kudos option.