It sounds like using the phone hotspot is a dead end. Maybe it is worth seeing if it is possible to use the school Wi-Fi. It is possible that the school's Wi-Fi is open (not protected by a password).
There is an example sketch for the "WiFi" library of the ESP32 boards named "WiFiScan". This sketch scans for all the available 2.4 GHz Wi-Fi access points and then displays information about each of them in the Arduino IDE Serial Monitor.
Please try this:
- Connect your ESP32 board to the computer.
- Select the board and port in Arduino IDE.
- Select File > Examples > WiFi > WiFiScan from the Arduino IDE menus.
- Select Sketch > Upload from the Arduino IDE menus.
- Wait for the upload to finish successfully.
- If the Serial Monitor is not already open, select Tools > Serial Monitor from the Arduino IDE menus to open it.
You should now see something with this form in Serial Monitor:
Scan start
Scan done
3 networks found
Nr | SSID | RSSI | CH | Encryption
1 | foo | -42 | 1 | WPA+WPA2
2 | bar | -44 | 1 | WPA+WPA2
3 | baz | -92 | 1 | WPA2
If it says "open" under the "Encryption" column for the row that has the SSID of your school Wi-Fi access point then you can connect the ESP32 board to the school Wi-Fi without needing a password. I can provide instructions you can follow to do that.