The answer to 'how to maintain P-trap' is to regularly inspect and clean the P-trap under your sink. The P-trap is the curved pipe that prevents sewer gases from entering your home and also catches debris that could clog your drain.
To maintain your P-trap, you should check it every few months and clean it if needed. This involves unscrewing the slip nut that connects the P-trap to the drain pipe, removing the P-trap, and flushing out any debris or buildup. You can also use a wire brush or plumber's snake to clear out any clogs. Be sure to replace the rubber washers if they are worn. After cleaning, simply reattach the P-trap and tighten the slip nut.