Following this guide from QEngineering.eu.
- Download ubuntu 18.04 LTS (bionic beaver) server edition here (choose the 64-bit ARM version, which is for Raspberry Pi)
- Install Raspberry Pi Imager here
- ...couldn't get Ubuntu to boot headless using WiFi, so I'm scratching that for now and trying RaspberryPi OS 64 for Raspberry Pi Zero 2.
On a sidenote, I found a cool Github repo that creates a WiFi AP while still connected to an AP (in client mode).
Also, here's how to connect to WiFi in Ubuntu using CLI.
Also see https://gist.github.com/tcr/4192613#file-code-sh