review this
How to delete apps on your iPhone, iPad, and iPod touch - Apple Support
you can delete from the App Library by locating the app and tap/hold, select Delete App
or you can go to Settings > General > iPhone Storage > [app name] > Delete
If you still are unable to delete, check:
Settings > Screen Time > Content & Privacy Restrictions > iTunes & App Store Purchases > Deleting Apps
make sure that's set to 'Allow'
Also..
Apps don't get deleted automatically.
If you are talking about the automatic 'offload' of unused apps, you can disabled that if you don't want it to happen
Settings > App Store, scroll to the bottom and turn off the switch for Offload Unused Apps