Gbyte blog: In which order should be Drupal updates and configuration import/export run?

The answer is… it depends on who is doing the updating.

You are updating the contrib code base

If you are updating the contrib code base, run the database updates before exporting the configuration, as updates tend to alter the configuration storage data which needs to be commited into the version control system: