Mbed-os 6.15 UART NOT working on stm32L432KC

When we look to your example

Macros USBTX, USBRX, used in first object with name serial_port, are pins PA_2 and PA_15 of UART2.
Your second object with name port1 use pins PA_2 and PA_3 (your changed to PA_15), that is also UART2. So you have two objects for one UART and also with two baud rates, that can not work ever. Because…
You declared first object which sets the UART2 to default baud rate 9600. Then you declare second object, which sets baud rate of UART2 to 921600. Then finaly in the main, you set the baud rate of UART2 back to 9600 via first object. So, your code will probably working, but on 9600 instead of 921600.

Another problem is the default debug console which is set to UART2. So you have to disable or redirect it via mbed_app.json

{
    "target_overrides": {
        "*": {
            "target.console-uart": false
        }
    }
}

BR, Jan