With mirrorless cameras the focus switched from specialized sensors to on-CMOS contiuous exposure sensors, so movement is easy to detect. At this point the cameras have specialized AI hardware to run the models, and they also accept user input (on R5 MkII you can register up to ten people to prioritize focus on[1]). The focusing options are now very complex[2][3], and combined with lots of customization options on the camera's buttons you can have very specialized/personalized setups for different types of photography.
[1] https://cam.start.canon/en/C017/manual/html/UG-04_AF-Drive_0... [2] https://cam.start.canon/en/C017/manual/html/UG-04_AF-Drive_0... [3] https://cam.start.canon/en/C017/manual/html/UG-04_AF-Drive_0...