I’ve been meaning to reply with a more complete answer but been really busy and tired. Here it is at last:
Read values from sensors
Most electronic circuits poll the sensor for values. That means they read the value from the sensor over and over at regular intervals. Most hobby projects probably do this far more frequently than necessary but there’s so little power used by most that the cost is negligible. So that resolves getting the value/s from the sensor/s to the controller (Pi, Arduino, ESP, MSP, etc.)
Display values in a browser
By far the simplest for this is to make the Pi/ESP a web server. There are libraries for this so you don’t have to write your own. It won’t scale well because, as you can imagine, these little devices are not designed to host sites for millions of users. But they’ll do a fair job if the pages you serve are small and simple.
The most complex option is to send the sensor data from the Pi/ESP to the cloud. All of the top cloud providers have specific IoT features for this sort of thing and will have web app features to let you provide a website that can show that data. This will require a good deal of cloud configuration knowledge as well as programming knowledge but it will let you have a site that billions of people can view (at a cost).
I hope that makes it easier to understand. 