There is a much simpeler, though less flexible, way to block certain apps and websites... namely the iOS ScreenTime setting.
The difference between my post and ScreenTime is it leverages the brains gravity to the apps as a driving force of good habits.
Also, one small flaw in ScreenTime makes it almost non-effective: it allows bypass with one click. When you've run out of screentime it will do its block, but then it allows you to bypass really quickly. If it simply made you jump through a few more hoops (Go to homescreen, Settings, ScreenTime, App ScreenTime config, bypass for day; for example) to bypass I think it would be respected way more (at least by me, can't speak for others).