Where you expecting to see a com port when running a UART?
If you want to get something on USB connection, like a VCP, you have to run something that doing the handling on the USB bus: so use a serial to USB adapter, connected to the UART you want to use, or set in Cube the USB -> device -> virtual com Port, to let it include all the libraries and USB stack to do the action, that's needed for a USB VCP to work.
Read examples or here in forum how to use it then.
If you feel a post has answered your question, please click on " Best Answer ".