Please check out the github repository, and the directions below.
The main idea is to have the raspberry pi pico w:
connect to the internet
synchronize the real-time clock
start taking magnetometer measurements in one thread
serve up the webpage in the other thread
Here are some references:
IEEE Article - David Schneider
I also created code that is just for a simple webserver if you are learning about the pico w for the first time. Hackaday Web Server
Wow - got featured on hackaday.com - thanks! Here is another project that was mentioned in the comments - check it out!
Remote Water Consumption Display - John Schuch
Also - you don't need both magnetometers - I used the old ST one because I had it. The ST one is discontinued, so I also wrote up code for the currently available one that you can get from adafruit.
I cannot get this to work, even got both magnetometers and still cannot get this to work.