I guess neither of those sites are providing the series data.
Amazon is pretty hit and miss. One listing may have set data, another won't. So it depends on which listing the scraper used
Here is one listing of the Harry Potter books...
https://www.amazon.com/dp/B09N38HLBT
But it only lists the first 3 books.
I am not a big user of Google books, but they don't seem to have any series data, rather just a search string masquerading as a set number.
And I wouldn't trust Goodreads for set data either. I've come across many a set that are incorrect.