You can go to Settings > Screen Time > Content & Privacy Restrictions > iTunes or App Store purchases > Deleting Apps. On this page, tap on Don’t Allow. This feature is only available for iPhone 12 and newer versions.