There are several methods to run programs, services and scripts at start when you boot the Raspberry Pi 4 B. For my MediaPlayer Box, i use the method over the .bashrc. After the automatic login to the console, a script is executed.
pi@raspberrypi ~ $ sudo mkdir -p /etc/systemd/system/getty@tty1.service.d pi@raspberrypi ~ $ sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf [Service] ExecStart= ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux pi@raspberrypi ~ $ sudo systemctl enable getty@tty1.service