Does Peanut butter polish out scratches?

No it doesn't, not even chunky peanut butter. This is an old wives tale that has been around for years and comes up occasionally as a 'life hack'.

Like many waxes, peanut butter contains oils, specifically peanut oil. So if you get peanut butter on your car, those oily residues might brighten up your paintwork and even hide scratches by filling them to some degree, but it will do absolutely nothing to actually polish your car or remove scratches.

Ironically, some polishes used to use the crushed shells from nuts such as almond and walnut as an abrasive, but this is not comparable.

And for the record, toothpaste isn't likely to be very effective either. You are safer sticking to dedicated car care products.