First make a systemd service file:
root@pve-s740-01:~# vi /etc/systemd/system/powertop.service
You can add this to that file:
[Unit]
Description=PowerTOP auto-tuning
[Service]
Type=oneshot
ExecStart=/usr/sbin/powertop –auto-tune
[Install]
WantedBy=multi-user.target
Then, enable the service using the command: