The answer to 'why is my P-trap overflowing' is that the P-trap, which is the U-shaped pipe under your sink, is likely clogged or obstructed. This prevents water from draining properly, causing it to back up and overflow.
Common causes include debris buildup, a foreign object stuck in the trap, or a blockage further down the drain line. Symptoms include water pooling around the sink, slow draining, and foul odors. To fix this, you'll first want to try plunging or using a drain snake to clear the clog. If that doesn't work, you may need to disassemble the P-trap and clean it out. If the issue persists, there could be a more serious blockage that requires a professional plumber to diagnose and resolve.