In addition to @mshevchuk’s suggestion, this function might also work to update the org-id-locations. Source here.
(org-id-update-id-locations (org-roam--list-all-files))
I have functions out of this principle:
(defun my/org-id-update-org-roam-files ()
"Update Org-ID locations for all Org-roam files."
(interactive)
(org-id-update-id-locations (org-roam--list-all-files)))
(defun my/org-id-update-id-current-file ()
"Scan the current buffer for Org-ID locations and update them."
(interactive)
(org-id-update-id-locations (list (buffer-file-name (current-buffer)))))