Whenever a new lav or sink is installed, the old p-trap it thrown out.
There should be a glued "trap adapter" on the pipe coming from the wall.
These can be glued onto the plastic pipe. The p-trap end should have a slip joint washer and nut for the new slip joint p-trap.
Fittings that look like an accordion should be avoided.