What Apple's built-in tools can do on their own.
iOS ships with Screen Time, which can limit or block individual apps and app categories. It is a reasonable starting point and it is free.
- Open Settings, then Screen Time, then App Limits to cap or block social apps by category.
- Use Downtime to switch off whole groups of apps during set hours.
- Set a separate Screen Time passcode so the limits are not trivial to undo in a weak moment.
The catch is the same one most people hit: the limits are easy to extend or disable on the spot, and the browser is left wide open as a backdoor.