When you defeat enternatus, you catch it. But what If you have no Pokéballs to catch it with in the first place?
If the player has no Poké Balls when they are prompted to capture Eternatus, one will appear in their bag.
Source As you see, it's like a must-catch Pokemon. Hope this helps!