@HANITALY
To use strlen(), the string header must be added.
#include <string.h>
To use printf, you must also redirect stdio fputc to USART1.
See the main.c file modified in attachment and the terminal result below using PC4 USART1_TX.
The printf and UART Transmit are working now.

In your code:
PC4 USART1_TX is available on AF4
PF12 USART1_RX is available on AF12
PC4 is available on MORPHO connector CN3 pin #13
PF12 is connected to Ethernet LAN8742A device on board, and it is not available on MORPHO connectors.
If you need TX and RX you can also use PD9 USART3_RX and PD8 USART3_TX on CN15 pin #35 and #37.
Note: PE5 USART1_TX and PE6 USRT1_RX are also connected to embedded STLinkV3 Virtual COM Port.
Refer to the example below:
STM32Cube_FW_N6_V1.1.1\Projects\NUCLEO-N657X0-Q\Examples\UART\UART_Printf
Best regards,
Romain,