the new monster manual says that a legendary action happens on "initiative count 20" what do theyy mean by that?
Precisely this. Anyone with 21 and higher goes before, 19 and lower after.That means it has a fixed initiative "roll" of 20.
And most of them say 'lose ties' which means a PC who ended up with a 20 for initiative goes before the monster.
I usually let PCs win initiative ties.