How to use 328PB as a Arduino uno?

A board built for a 328P will not be compatible with the pinout of the 328PB.

Actually, it will probably work. Some of the pins that supplied power on the 328P are now IO pins, but as long as you don't enable them as outputs, that should be OK.

If you switched the fuses back to use internal clock with a failed crystal that would be a neat trick.

One of the improvements to the 328pb is "clock failure detection" - of the XOSC isn't working, it will switch over to the internal clock automatically. (No more bricking boards by setting the fuses wrong!)

One of the dis-improvements is the removal of the full-swing crystal oscillator, and speccing the low-power oscillator at 16MHz "maximum."

https://www.avrfreaks.net/forum/atmega328pb-frequency-instability-issues-solved

This probably means that the oscillator is more sensitive to good layout and exact specifications of the crystal and associated components. (I had some ATmega8 boards that needed "full swing" to run the 16MHz resonators that I had used.)

What could be happening is that your crystal isn't working, for one reason or another, causing the chip to revert to the internal oscillator. Of course, that's a different frequency than your crystal, so the uart is not operating at the expected speed.