One reason a lot of people are getting confused about API copyrights is that Oracle convinced people to describe the API as "declaring code" and computer programs as "implementing code." To non-programmers this makes them sound more similar than they really are.
A computer program is a list of instructions to a computer. You execute the program and the computer does something. An API, on the other hand, doesn't do anything. It's just a list of functions a program makes available to the outside world.
Google's claim is that the functions a program can perform is a fact about that program. And you can't copyright facts. The fact that this information is conveniently summarized in a format that kind of looks like a computer program doesn't mean the law should treat it like one.
Two implementations of Java are going to use a lot of the same keywords because those keywords define the Java language just as two English dictionaries contain a lot of the same words. But what's being copied is the rules of the Java language, not Oracle's implementation of it.
This thread inspired by @grimmelm, who muttered "I hate the phrase 'executing code'" during our interview for this story. https://arstechnica.com/tech-policy/2020/10/googles-supreme-court-faceoff-with-oracle-was-a-disaster-for-google/