This question has been asked here enough I wanted to contribute my solution.
I have a project where I imported 1000 users into a WP site. I set up custom fields with MB. Some of those fields are address fields using MB Geolocation functionality. I could not figure out how to bulk update the addresses and generate latitude and longitude values. Using Google Maps API. I'm using facetwp with their map facet addon, and you can only get users to appear when there are latitude/longitude values present (also using User CPT addon, so clutch)
I created a script (with the help of Claude) that is a wp cli command. https://gist.github.com/digisavvy/d35159a93a5d5959d4e348447eb6f2d8
The script looks for users only with values in the address_student field and processes the record to update the latitude and longitude values.
You could adapt this to regular posts or CPTs in WordPress.