Wasn't PHP a CGI script at first?
The earliest use of the term "Web 2.0" was in 1999. This was way before what we associate today with "Web 2.0". Web 1.0 was retronymed in order to hype up how much better 2.0 was.
And yes, web forms existed earlier but they define the difference between a web of hyperlinked documents and a web of services.
On Web 1.0 if you wanted to create content you would create a website with any content you wanted on say GeoCities or just installed Apache on a computer and kept it running. The key word is "hyperlinked".
On Web 2.0 if you wanted to create content you posted on a forum, commented on a comment section on someones blog, posted a video on YouTube, customized your page on MySpace later Facebook. Later this became far more centralized but even the early services that hosted user content were still 2.0. The key word is "interactive"
All interactivity, even today, depends on form controls: buttons, text inputs, check-boxes, etc. .
Web 3.0 was supposed to be the Semantic Web and allow all of the information on the web to be understandable by computers not just displayed. If this became a reality then there would be no need for APIs (the web would be the API), or for scraping. The key word is "machine-readable".
Later Web3 was redefined to be about decentralization of some kind (even if many crypto-adjacent things rely on very centralized resources). Obviously, the key word is "decentralized".
These are all very fuzzy marketing terms, buzzwords, and they don't really mean that much, but at least there is a vague theme that defines each one of them. All of these "versions" coexist so it isn't surprising that Web 2.0 services existed before the term was coined. Similarly, even if they are ignored, torrents are a Web3 like thing that predates Web3.