You can update the firmware via USB or UART via bootloader. So, connect the UART to a system bootloader-supported interface and jump to the bootloader when you want to program the device.
Please have a look at the AN2606 for supported devices and AN3155 for UART bootloader commands.
You can also refer to these articles for further information:
Hope this helps you!
The USB connection on this board https://www.st.com/en/evaluation-tools/stm32f0discovery.html connects to the ST-LINK not the STM32F0. You should use the ST-LINK with STM32 Cube Programmer to program firmware onto the STM32F0 part.