How to safe adjustments on boot

I adjusted some power settings on my laptop (Legion 5 AMD 5800h, NVIDIA 3070).
Basically, I turned off all boost frequencies on my CPU and GPU.
Now my temps is very good.
On WIN10 I use Afterburner and Windows battery settings (with power profiles), to tune my performance and temps.

I use ------------------- >

sudo nvidia-persistenced

nvidia-smi --lock-gpu-clocks=0,1560 --mode=1

echo 0 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/boost

How to save these settings so each time after boot I don’t enter it in terminal?

sudo systemctl enable --now nvidia-persistenced

You need to make a systemd service for this that runs on startup.