I know a lot of people dont like them. But they're actually pretty useful. For example, you can set it like if you open an app it performs a certain function like if i open google maps the location and mobile data is turned on automatically and if i go out of that aap it gets turned off. Tons of other stuff is there. Do check that out.
it's basically if then else statement and I as a samsung employee cannot recommend routines enough previously it was only on good lock but a lot of people wanted part of their phones as it was so good and there we go with android 10 update we added routines :) it's amazing