At the end of Spider-Man 2, Harry Osborne discovers his father's Green Goblin lair. When I saw the movie, I understood that scene to be the moment when Harry first learns that his father was the Green Goblin.
However, in Spider-man: No Way Home, Octavius sees the Green Goblin and immediately recognizes him as Norman Osborne, which suggests that the Green Goblin's identity was widely known previous to Harry discovering the lair.
Is Harry supposed to have known about his father's villain identity throughout Spider-Man 2?
Note 1: I'm specifically looking to know what the creators of Spider-Man 2 intended when they made it (as opposed to the creators of No Way Home, who may have interpreted the movie differently than it was originally intended).
Note 2: In my headcanon, Doc Ock in No Way Home is actually not the same Doc Ock as the one from Spider-Man 2, but is instead a Doc Ock from a universe that is almost the same as that of Spider-Man 2. This explains the fact that his haircut is different, and lets me think that in the Spider-Man 2 universe Harry didn't know who the Green Goblin was, while in the universe that No Way Home's Doc Ock is from, the Green Goblin's identity is widely known. However, I don't think my headcanon matches MCU canon, hence my question.