On a SAMSUNG Galaxy Note 20 Ultra, I would like to take back to back pictures and store them as RAW format automated by a script (that needs to run for hours). I much prefer to store bit counts by the camera sensor if possible (this is for astrophotography).
I'm a python developer and have never been exposed to android ecosystem (please be easy on me). I would appreciate a step-by-step guide.
Android has a Doze mode which means that unless the device is plugged in for power, apps will be suspended after a period of time.
Android device manufacturers may add in their own power saving mechanism, resulting a site like dontkillmyapp.com to exist. If you are running your activity while charging, you should not have issues, but just in case, be aware of OEM/ODM power management.
If you are looking for an camera app there is Open Camera whose help page is extensive regarding available controls/settings and can be configured to take multiple images with a timer. Alternatively look through Izzy's list of camera apps to see if an another camera app fits your needs.
There are apps like Tasker which allow for additional automation.
Note that while a specific device may have a large image sensor, third party apps are limited to what is given by the Android Camera APIs, and that the manufacturer's "stock" camera app may have features not exposed via official APIs.