Arduino connect over internet - noob qu

Hi there.
Have had a look and can not find an answer to this question.
I am a teacher working working with students. We have had a whole heap of Arduino success … uno over USB.
Simple goal… to go truly wireless.
Question, To go truly wireless, can I code using the Arduino online editor and send the code remotely to a wifi enabled Arduino, such as the MKR 1010.
If this ‘can’ be done, are the wifi creds flashed to the board first - and remain separate to the sketch.
Or do they need to be part of the sketch.
Or is it just no possible.
Any guidance to achieve this would be really appreciated.

Check out the wifi101OTA library. This is meant to do what you are after, but last I checked (November last year) it didn’t function correctly correctly with the MKR 1010. The Arduino forums should give some help as well.