Raspberry Pi 4 and Raspberry Pi 400 receive a new feature courtesy of a beta bootloader
The Raspberry Pi Foundation has introduced the ability to install an operating system on a Raspberry Pi without having prepared a microSD card on a secondary machine beforehand. Currently the subject of a public beta, the Network Install feature allows a Raspberry Pi 4 or Raspberry Pi 400 to launch the Raspberry Pi Imager application directly by downloading it over Ethernet.
The Pi Foundation explains in a blog post that the Raspberry Pi Imager application runs in memory on your Raspberry Pi, allowing you to flash an operating system to a microSD card or other supported media as you would normally. To enable Network Install, you must update your Raspberry Pi 4 or Raspberry Pi 400 to a new beta bootloader, obtainable from Raspberry Pi Imager.
The Pi Foundation stresses that you will need a microSD card to flash the bootloader, which Raspberry Pi Imager will wipe before installation. Hence, you should not use the microSD card installed in your Raspberry Pi. Unfortunately, Network Install does not support a headless setup because of its reliance on Raspberry Pi Imager. As such, you will need an external display that has an HDMI input, along with a keyboard and mouse.