Despite the original IRobot Roomba releasing in 2002, the robot did not contain any hardware for self docking until 2004, with the release of the Roomba 4000/discovery series. The dock worked by shooting 2 ir beans in 2 different directions, allowing it to guide the roomba between them right to the base where it's charging pads make contact with the pins on the dock. Despite this design being almost 20 years old, modern Roomba docks work in almost the exact same way!
Just to make sure you're aware, as far as we know every single pixel 5a produced is defective and can die randomly at any point. Make sure you are constantly taking backups of anything important on your phone and make sure you have a backup phone of some sort just in case.