The answer to 'why is my P-trap foul smell' is that a smelly P-trap is usually caused by a dried-out water seal or a blockage in the trap. The P-trap is the U-shaped pipe under your sink that holds water, creating a seal to prevent sewer gases from entering your home. If this water seal dries out or the trap gets clogged, it can allow unpleasant odors to come back up through the drain.
Some common causes of a smelly P-trap include evaporation of the water seal during periods of infrequent use, a blockage in the trap from debris or hair, or a crack or leak in the trap itself. Addressing the underlying issue is important to eliminate the foul odor.