How to overwrite exisiting functionalities?


I need to overwrite some existing functionalities. Like “hide the ability to change the email address from the settings page” / “add some extra functionalities in the mail app inbox page” How can I do it?

I believe, to directly update the code in settings or mail app is not a good approach. Is there any way to overwrite the code-base?

Let me know, which one is the good approach to change the existing functionality?