The CubeMX configuration to enable Debug == Trace Asynchronous Sw, is actually not required at all with CubeIDE. Why? At debug launch, the CubeIDE will configure all needed registers on the device to allow SWV trace.
I also think that the first test should be to just use ITM_SendChar() directly to print a character on ITM-port 0. If this works, then you have to look at glueing it together in syscalls.c:_write() function to have printfs directed to ITM-port 0...
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.