Battery voltage monitor and AD conversion for XIAO_ESP32C

It is alot of complicated stuff

Have you read the function analogReadMillVolts() to see what complexities are involved?

at the end of the day it is taking a binary number and converting it into a decimal number that it presents to you as a millivolt

Have you estimated how much error is involved in converting binary to decimal and then to millivolts? If you know, please let me know.