Does anyone know how to block child's iphone from unsafe apps?

Set up Family Sharing and turn on Ask to Buy so new apps require your approval. Enable Screen Time with a strong passcode and use Content & Privacy Restrictions to set Installing Apps and Deleting Apps to Don’t Allow (and In-app Purchases to Don’t Allow), plus Web Content restrictions if you want tighter web control. If you want easier ongoing control, Eyezy is a solution I settled on after trying a few.