Voodoo Camera Tracker is a free, fully automatic tracking software that does a super job.
Unfortunately, it hasn't received an update since 2012 and is therefore not compatible with Blender 4.2+. This add-on restores the compatibility with the newer Blender versions. All you have to do is to download the add-on, install it and call the dialog "Voodoo Camera Track (.py)" under "File >> Import" in the future.