I’m going to buy a digital piano, I’m a classical pianist, so I would like to know will 128 polyphony be enough to play everything like Rachmaninoff or Liszt, because they have a lot of notes?
There's no simple yes or no answer to this - it depends on how smart the polyphony recycler is.
Dumb devices will simply steal the oldest note.
Smart ones will steal 'the one least likely to be noticed' by quite a complex algorithm I'm not at liberty to divulge.*
The difference between the best & worst is most noticeable if you hold down the pedal, bang a good loud couple of bass notes in a low octave, then tinkle away gently on some top end. See if the bass suddenly vanishes at an inappropriate moment, or appears to die away at the correct rate.
Some devices will only steal once all notes have been used, so with 88 keys even 'dumb' devices may not appear to steal. Unfortunately, that algorithm is poor on repeated 'same notes' as they don't build up resonance properly.
Smart devices also add their own sympathetic resonances by gently adding in notes & harmonics you didn't actually play - same as a real piano with the pedal down.
*My actual working knowledge of this algorithm is now also 20 years out of date, but I'm still under NDA.
Additionally, as a 'shopping guide', all these things are built to a price - any series/family from each manufacturer will fall into a price bracket, for a specific market segment, with several models in each series. All manufacturers have a series in each bracket. Each price increase in a series introduces better features [or sometimes just better finishes, watch out you're not paying extra for a finish you didn't need], but if you really want the closest thing you can get to a real piano, you're looking at the top model in the top series from each manufacturer.
The really good stuff does not come cheap.
128 is the theoretical maximum that's possible at all with any single MIDI-based instrument, because there are only 128 different notes you can have at all. It's even more limited since the piano specifically has only 88 keys, so even if you play with pedal and strike all the keys, it won't even get to use all the polyphony it technically could.
So, yes, unless the piano uses a stupid greedy note-steeling algorithm as mentioned by Tetsujin, 128 will be plenty enough for piano. The only way it could be not enough is if you use a sequencer and address multiple instrument sounds at once, but nowadays that's pretty irrelevant – just use a DAW with recorded audio for that kind of stuff, not multichannel MIDI.
Generally note that modern digital pianos use a mixture of wavetables, full-length samples and physical modelling, which means that the number of polyphonic voices is not really a fixed number at all anymore. What they mean to express with “polyphony 128” is likely just that it's impossible to get this instrument to the limits of its polyphony.