https://www.raspberrypi-spy.co.uk/2015/10/how-to-autorun-a-python-script-on-boot-using-systemd/
There are many ways to start a script on boot but systemd appears to be the best and most reliable.
$ cd /lib/systemd/system/
$ sudo nano pygpio.service
Paste the following into pygpio.service
$ sudo chmod 644 pygpio.service
$sudo systemctl daemon-reload
$sudo systemctl enable pygpio.service
$ sudo reboot
AFTER REBOOT
sudo systemctl status pygpio.service