I have set a similar restriction up for our 7th and 8th grade students. In Apps> Google Workspace> Gmail> Compliance> Specific OU> Restricted Delivery, you can establish a rule restricting delivery. When you start to create the rule, it will ask for addresses or domains to allow. I established lists for teachers, paras, and parents. What this rule permits is the sending/receiving of emails from their classmates and those on the allowed lists. No other user can successfully send to them.