Receiving data from mavlink using STM32

I want to get some autopilot data via Mavlink with STM32. I imported the library into STM32Cube ide but I couldn’t establish the relationship with Hal_uart. Can you help me?

how did you import the mavlink library into stm32cubeIDE.Where did you get library? Can you explain?

You generate the library using pymavlink on the PC. Read the pymavlink documentation.