How can I refer to a figure number in text such that it automatically updates when the figures' captions are updated?

In Libreoffice, one can easily add a caption with a figure number to nearly any object, but it is desirable to also have the ability to refer to these figures. While it is possible to manually change what number is referenced in one’s text on an as-needed basis, this is cumbersome and error prone. How can I insert a field that automatically updates? I know that Libreoffice supports this as I was able to add new figures anywhere in a document that was imported from a Word docx file that someone else wrote, and their in-text references updated exactly as they should, but I can’t find the buttons that I need to make this work.

It is easier to see where fields are if you have Formatting Marks turned on.

Click Insert > Field > More Fields (or Ctrl+F2), in the dialog that opens, select the tab labelled Cross-references. Under Type select Figure, under Insert reference to select Numbering, under Selection choose the image to which you wish to refer, as image below. Cheers, Al