The question of whether an appliance must be replaced or repaired can only be answered by an expert. All home appliances work differently and have different lifespans. To decide whether to repair a product or not, you should consider if the cost of servicing it is more than the value of the depreciated product and the intensity of the problem. The best thing to do would be to take the appliance to a professional service at the first sign of an issue.
Though this varies from one service provider to another, the usual procedure is the diagnosis of the issue with the appliance, followed by a report on the issue and requirements of any parts for the appliance. You can then decide if you wish to repair the product or replace it. Even after repairing the appliance, if the problem persists, reach out to the service providers immediately.
Most genuine parts come with a warranty. Regardless of whether the parts are replaced in their service centre or at your premises, verify the quality of the spare parts. Get a receipt for all the parts replaced by the technicians and ask for their warranty cards so as to avail this in future.