I don't understand why you have so many apply to each actions with none of them doing anything. That would be one problem. However, the problem causing the error is that you put an ID field in your Apply to each 3 action. As the error message says, you need to use an array and an ID would return a single value. This article will explain what an array is: Power Automate Arrays: The Common Operations Guide 2022 (zeitgeistcode.com).
Here is an example of a workflow where I have nested apply to each actions. This is a temp workflow, so I didn't update the names of the actions and since it is working, I don't want to rename things now since it will be deleted once I get the go-ahead to run it on all items.
However, what it is doing is looking at items in a list based on certain criteria (basically, requests that are still open). We added a new field to the list, and the data that populates this field comes from another list on another site. To avoid having to manually open every item and update the form so it populates the new field, I have written a flow to do this.
Main part of flow:

Apply to each expanded:

- The value in the first Select an output... in the Apply to each is the Value from the Get items action after the trigger action. This is followed by the Get items 2 action, which pulls data that I need to update the original Get items action with. It uses a filter query based in the original Get items action that is passed to the first Apply to each:

- I know this will only return one value, as the job code is unique in the Get items 2 action.
- The Apply to each 2 has the value from the Get items 2 action. Even though I know there is only one result, Power Automate will put this into an Apply to each.
- The Compose Max Value gets populated with the corresponding value from the second Get items action. I know I will only get one value returned, but if whatever you were doing did not return just one item, the last value the apply to each found would be populated in this compose action.
- I then use the value in the compose action to go back and update the item from the original Get items action.
Hopefully this makes sense and illustrates how to use nested apply to each actions. Although, it barely makes sense to me, but I am not sure how to explain it better 🙂