Wi-Fi is not the internet. You can be connected to WiFi but not connected to the internet. And you can be connected to the internet without being connected to WiFi.
To be able to explain what the difference between the internet and WiFi is, I need to explain what each of them are.
The Internet is the large scale interconnection networking of multiple Computers/devices around the world via multiple methods. One of those methods is Wi-Fi.
Wi-Fi is just one of a multitude of ways of wirelessly connecting Computers devices over a relatively short distance. Usually about 100 meters. Two other ways of connecting computer devices wirelessly, are Bluetooth and mobile (cellular).
Typically most long distance internet connections are done via cables, Copper and fibre optic cables. For convenience and where shorter distances are required, the internet can and does, transfer data wirelessly. One of the Wireless methods being WiFi
The Internet is a public network available to all Internet users. But there are also private networks. Such as the network of computing devices within a home, or small business. These private networks are often called Local Area Networks (LAN). Whereas the Internet and other large networks are often called Wide Area Networks (WAN). All networks can be connected by cables or wirelessly.
Within a local area network it is possible to copy or move data between computers without using the Internet. For example copying photos from one computer to another. Which can be done via a cable or wirelessly. And a wireless method is Wi-Fi. Therefore it is possible via Wi-Fi to transfer data between computers, on the same LAN, without using the Internet.
If two computers connected on a LAN via a cable and one of those computers is connected to the internet it is possible to use the internet on the other computer without Wi-Fi.
Desktop computers generally connect to the internet without WiFi
Therefore Wi-Fi is not the internet.
After many years of using the internet, I can say with confidence that most of the indicators that purport to tell you it you have or do not have a internet or Wifi connection are WRONG. This works both ways. A displayed message saying you do have an internet connection when you dont as well as a message indicating you do not have an internet connection when you do. This can be because of timing issues. If your devise looses a connection to the internet it may not show a message about that immediately, because it may be that you just have a slow connection, and those that design such systems dont want to give you a wrong message. Same applies if you are not connected and then become connected. They dont want to show a message that you are connected until you have been connected for some time. The result is that the messages can be WRONG and so can be useless. The only way to be sure if you have an internet connection is to see information appearing on your devises screen.
Even then, because of modern browsers ability to access web pages you often access, even before you go to them (preemptive caching) and caching in general, it can often appear that you have a internet connection when you dont. You click on a link or go back to a previous page and it all appears ok even though ther is no interent connection. A classic example of this is the Google home page. Because it is accessed so often it could be stored in your devises memory so will appear regardless of if you have an internet connection.
A way of being more sure of having a internet connection is to call up a page that you have never accessed before. I do this typing in random characters into a google search. If Google returns a result then you are most likely connected to the internet. If, after a period of time nothing happens of you get a message to say you have no connection, then most likely you are not connected to the internet.
With mobile phone connections to the internet, things get even more complicated because phones can have a internet connection via the mobile phone network or via Wifi. If a WiFi connection drops out (becomes disconnected) and Mobile data is switched on, then most phones will then revert to the Mobile phone data connection to the internet. Typically mobile phone internet data costs more than the same data provided by Wifi. Often no indication is give when this happens, such that you may be using the more expensive mobile internet data without knowing it.
On Android phones a very small icon at the top on the home screen should display when you connected to a WiFi Access Point (AP). But unless you are looking at it most of the time you may not be aware if it disappears.
If your devise shows that you have a Wifi connection (above is icon that shown on Android Home screen) then that does not mean you have an connection to the internet. It simply means that you have a connection to the the WiFi access point (AP).
An analogy would be if you have an electrical power board where you have a light plugged into it. Even though the light is connected to the power board, if the power board is not plugged into a live power socket the light will not come on.