When you want to serve personalized experience to your shoppers, it always ends up at Magento Customization & we have never recommended modifying default core functionalities, but we can extend core functionalities by overriding. Here is a guide to override framework class in Magento 2.
What is Tuts Publication Network?

Tuts Publication Network (TPN) is a platform to Explore, Save & Share unlimited web pages, videos, photos online.