OpenSTLinux distribution does not provide flashlayout files to use UART as serial boot device.
Refer to Using_STM32Programmer_over_UART article to know how to modify a flashlayout file to use UART as serial boot device.
You can use the modified flashlayout as described in STM32CubeProgrammer#How to flash with STM32CubeProgrammer article.
For example, if the provided file FlashLayout_sdcard_stm32mp157c-dk2-optee.tsv can be used on USB with the command:
STM32_Programmer_CLI -c port=usb1 -w FlashLayout_sdcard_stm32mp157c-dk2-optee.tsv
then you can replace tf-a-stm32mp157f-dk2-usb.stm32 by tf-a-stm32mp157f-dk2-uart.stm32 in this tsv file and the resulting file FlashLayout_sdcard_stm32mp157c-dk2-optee_uart.tsv can be used on UART port /dev/ttyACM1 with the command:
STM32_Programmer_CLI -c port=/dev/ttyACM1 -w FlashLayout_sdcard_stm32mp157c-dk2-optee_uart.tsv