How to build custom Ubuntu Server image for Raspberry Pi 4?

Hi,

I’d like to build a custom Ubuntu Server image for Raspberry Pi 4. How do you do that? Where could I find the code that generates the stock images (i.e., the images here: https://ubuntu.com/download/raspberry-pi)?

Thanks