The answer to 'when to replace drain trap' is that you should replace your drain trap every 3-5 years, or sooner if it becomes cracked, damaged, or starts leaking. The drain trap is the curved section of pipe under your sink that helps prevent sewer gases from coming back up into your home. Over time, the seal can dry out and the trap can become worn, leading to leaks and odors.
Replacing the drain trap is a simple DIY project that can help maintain your plumbing system and prevent more costly issues down the line. If you're not comfortable doing it yourself, it's best to call a professional plumber to ensure it's done properly.