Moodle 3.7.x needs PHP7.3, which is not available on Raspbian Stretch (without hacking), so to summarize: what you want is not possible without a lot of hacking on a MoodleBox.
If you still want to do it, you'll have to upgrade to Buster before (see below), then upgrade your Moodle installation as indicated here: https://moodlebox.net/en/help/moodle-version-update/ (look under Update to a major version).
Upgrading to Buster is out of scope of this MoodleBox forum (and unsupported, you're on your own and I take absolutely no responsibility if you brick your device and lose your data). Anyway, you can try this:
grep -rl stretch /etc/apt/ | sudo xargs sed -i 's/stretch/buster/g'
sudo apt update && sudo apt dist-upgrade
This process can take several hours to complete. Reboot then your device. Cross your fingers!