Auto-fill question matrix based on ID

You could do this using the pulldata function as outlined in the support article Pull Data Functionality in KoBoToolbox.

You could also have a look at a workaround discussed previously: