We use “on the internet” because we treat all technology with screens as surfaces. We use the preposition of place “on” with surfaces in English.
You need to look that up on the internet.
There are millions of things to do on the internet.
On the Internet
We use the preposition “on” with all technology that functions with screens. This is because the images on these screens appear “on a surface” and therefore always use the preposition” on”.
We use “on” with surfaces as it shows the relative position of something. Think about an easy example: “the cup is on the table”. The position of the cup is supported by the table. In the case of the internet(and everything that is part of the internet), the screen supports the technology.
Examples with technology(that appear on screens)
I sent him a message on Facebook.
Where else but on the internet can you buy a statue of Cristiano Ronaldo.
Did you see the new filters on Snapchat?
I posted a video on TikTok and it has had 100 views already.
Examples in the physical world with on
I hung the picture on the wall.
My laptop is on my desk.
The bread is on the first shelf.
Note that there is no need to say “on the internet” when we are discussing the internet in general.
The internet is a place where you can meet new friends.
We use “on the internet” when we want to show the internet as a “place” where something happens.
You can meet new friends on the internet.
In the Internet
“In the internet” is not very common in English as we use the preposition of place “in” with volumes. If you said “in the internet”, it would probably mean something like within the physical boundaries of the technology of the internet.
Think about a computer. If you say “in the computer” you are talking about the component physical parts inside the computer like the hard drive, graphics card, circuit board, etc. If you say “on the computer” then you mean how you engage with what appears “on the screen” of the computer”.
It doesn’t really make sense to use “in the internet” because the internet is more commonly thought of as using the websites, apps, platforms, etc rather than the physical components of how it works.