2015-current P500 has a 475cc engine
2021 P520 has a 518cc engine (2mm larger bore), otherwise the engine/trans is the same
2015-2016 are manual shift only (paddles) and will run 42mph, speed limited by RPM & MPH
2017-current P500/P520 have auto shift option, slightly taller 1st gear but a lower top speed overall (I've heard anywhere from 38-40mph), the final drive in the trans uses different gears also but the ratio is very close to the pre-'17s
The increased bore on the P520 is a carryover from the 2020 Foreman atv line, slight hp increase (1.2hp is the number I've heard), the main reason for the change was cleaner emissions according to the articles I've seen.
For either model the engine & drivetrain is based on a design that's been in production since...... 2005 or 2006 if I remember correctly.