Neither, it should have been Ash
The other two are unlikeable clowns
Considering the fact part of Goh’s goal is to capture all the Pokémon and capturing Eternatus actually progresses his goal even with it being immediately sealed away it makes more sense for Goh to capture it then Ash.
Like I can understand not liking or hating Goh however in no way it does make any sense for Ash to capture Eternatus over Goh when Eternatus is just going to be sealed away immediately afterwards.
Ash gains absolutely nothing from catching Eternatus and the immediately sealing it away.
Plus I think a lot of people would agree here that if Ash’s is going to get his first legendary Pokémon that is not a mythical, and/or Ultra Beast Pokémon it should be one that he at least uses especially if is a mascot legendary even if it winds up getting released.
Rather then having Ash’s first legendary Pokémon that isn’t a mythical or UB be one that is immediately sealed away and he never uses.
If anything it would be bad writing to have Ash capture Eternatus over the other main character whose literal goal is to catch every Pokémon especially when Eternatus was going to be immediately sealed away.
I could maybe understand if it was a situation where Ash was going to keep Eternatus and bond with it, but since Eternatus was immediately going to be sealed away regardless of who catches it.
Then no regardless of how people may feel about Ash or Goh it doesn’t make any sense for Ash to be the one to catch Eternatus.