An update record action will only work if there is exact one record ID. You cannot submit multiple record IDs to a single Update Record action and have it update all of the records.
Some options include moving the automation around to the linked table and using a lookup of a rollup on the linked table to indicate when the automation should fire.
Another option is to use scripting.
or if you will have a maximum of two linked records, you might be able to use conditional rollups or a rollup and formula fields to split the linked record IDs into different fields. But that is rather complicated are rarely worth the complexity.