We shouldn't be able to have two blocks with the same name but I'm guessing we recreated the query on the same block just to share the setup. I would love to see how these blocks are connected, feel free to send it in a DM if you prefer.
The only reason I see this happening is if these blocks are running independent from each other, the second block would be running before the data property of the first one is populated.
We could make two REST API Function queries, for example:
One function to make the first request:
And another one for the second request:
Then use one JS block to run the second one with the output of the first one: