https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup#method-2-autostart
First, install xterm:
sudo apt install xterm -y
Then, if it doesn't already exist, create this folder:
mkdir /home/pi/.config/autostart
Lastly, create this file with the contents below:
sudo nano /home/pi/.config/autostart/startup.desktop
[Desktop Entry]
Type=Application
Name=Your name
Exec=xterm -hold -e '/usr/bin/python3 /home/pi/Desktop/_your_script.py'
Save and exit: CTRL+X -> Y -> Enter
sudo reboot