Shell script does not work if I put it in crontab, if I put it crontab I must to use sudo for working crontab

I don’t use cron - but a systemd timer - this can be done as --user so you don’t need root.

You can find an implementation you can learn from in this topic

I know you asked specifically about cron - but I have never used so …