Altering Magento 2 functionalities and inserting your changes is a necessity. In this article, we will go over some basic altering methods - Observer, Plugin and Preference/Rewrite in your module and in your theme where you can override .phtml, .css, .xml, and .js files. Starting with the presumption that you know how to make a basic module in Magento 2, let’s begin with the first method. Observer We could use the Observer.