It’s 328 and 328P. Letters after the dash indicate the ordering code. For both of them, not only 328. The ordering code is internal to Atmel/Microchip and its meaning is not documented. While some have been correlated with packaging type, binning or delivery options, other remain a mystery.
You are mentioning an U code, which is not listed in datasheets for ATmega<X>8 series, but that’s not the first time such components surface. However, be sure to check if that’s not AU, MU or PU: those are QFP, QFN and PDIP packages.
Be VERY careful with the letters on the end of AVR mcus, sometimes it matters, other times it doesn't. But it ALWAYS means you need to check.
eg, ATMega328 vs ATMega328P vs ATMega328PB
(PB does not mean lead/leadfree, it's got different physical hardware support, QTouch, Peripheral Touch Controller etc)
Also
ATTiny2313 vs ATtiny2313A vs ATtiny2313V
The A version is a newer iteration and has PCINT on all pins but the non-A only has PCINT on some pins.
The V version is a non-A type that can run on lower voltages.
So if you designed your hardware for one you could run into real problems if you got the other on the board.
But it gets worse, When they came out with the newer 'A' type 2313A they also decided to come out with a 4KB flash version.
Since there was no prior 4313 part they called the new one 4313 and not 4313A like you would expect.
So you have ATtiny2313 and ATtiny4313 and the 4313 is the newer version with extra PCINT but the 2313 is the old version without it.