The initial portion of it, yes. The protocols that we continue to use now, yes. ARPANET was started back in 1966 by DARPA (you know- military? part of the government?). They developed the Transmission Control Protocol (the TCP portion of TCP/IP) in the early 1970's. TCP/IP was the standard in the early 1980's on ARPANET. The National Science Foundation (again, part of the US government) implemented CSNET for computer science departments and universities to connect to the nascent network. ARPANET was decommissioned after ~1990 as private industry took over. DARPA also did work on an early version of hypertext transfer protocol (the HTTP that you used to see in browser windows). The US government did do the initial funding, research and development, and testing of the internet as we know it now.
Likewise, many medicines are discovered because of government funding. The mRNA vaccine that is helping smart people avoid COVID infections received government grants:
https://reader.elsevier.com/reader/...egion=us-east-1&originCreation=20210922173340 (see the acknowledgements).
Few companies fund basic research anymore- there are very few Bell labs in existence anymore. Google is one that does basic research. Basic R&D costs a lot of money with uncertain returns on that investment. The US government has been funding a lot of R&D, and setting the stage for private companies to make the discoveries into something useful.