Setting bash script to be automatically started
Create your shell script as run.sh in your $HOME/myfolder folder.
Paste the following one-line script into Script Editor:

do shell script "$HOME/myfolder/run.sh"

Then save it as an application.
Finally, add the application to your login items.


For login item, you can check this page: https://support.apple.com/guide/mac-help/open-items-automatically-when-you-log-in-mh15189/mac