I think the issue is that the command you need to run isn’t “sudo pm2 startup”.
If you run “pm2 startup”, the real command you’ll need to run appear
pi@raspberrypi:~ $ pm2 startup
[PM2] Init System found: systemd
[PM2] You have to run this command as root. Execute the following command:
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi