Caption numbers changing order

I am creating a document that sometimes needs two images on the same line. Sometimes after adding the second image and inserting the caption, the two images switch caption numbers. I’m new to LibreOffice–how can I prevent that, or fix it if it happens?

Hi

Try to anchor as character…

Regards