Nice first script! some tips though from personal experience:
If you want to do the script the way you have done it, look into this:
Having a condition check whether a process can be done could help if the script skips one of the functions/tasks you have created, also splitting up each task for small scripts makes them easier to manage
And instead of static sleep times, use conditional sleep
This just makes your script run better and seem more human like (not to be confused with antiban)
There are a lot more things you can do but someone else could chip in at some point with more help! A lot of this stuff, you just learn from experience, but so far, you got the basic logic down