Limit the admin functions in the Settings for Sharing, Groupware, Activity by writing the new app

Good day. I’m developing an app for Nextcloud-server and accidentally ran into the problem. I need to remove some functionality in the settings for all users. For example Sharing, Groupware, Activity in the Settings section or disable access to the /settings/apps for all users. So, created new routes in my app. I’m trying to override routes of settings and redirect them to the 404, but unfortunately, it doesn’t work because the ‘Settings app’ loaded in the Core of nextcloud server and it doesn’t give the opportunity to change something.
Could someone help me with this problem?
Maybe someone has a better approach to resolve my problem?
Maybe you can share a link to the GitHub example or something like this.