However, if you want to restrict apps when using (sharing) an iPhone/iPad with your family, you can use iOS “Screen Time” to restrict installation, billing, and deletion of apps. (Forbid) it would be good.

Restrict (prohibit) installation, billing, and deletion of apps

iPhone/iPad - Set iTunes and App Store password requirements iPhone/iPad - Set allowed websites (Screen Time)