Hello @Ahajr.1 and welcome to the Community =)
By default, the STM32Cube HAL is built around a unique timebase source which is the ARM-Cortex system timer (SysTick).
However, HAL-timebase related functions are defined as weak so that they can be overloaded to use another hardware timebase source.
This is strongly recommended when the application uses an RTOS, since this middleware has full control on the SysTick configuration (tick and priority) and most RTOSs requires SysTick and force the SysTick priority to be the lowest. Using the SysTick remains acceptable if the application respects the HAL programming model, that is, does not perform any call to HAL timebase services within an Interrupt Service Request context (no dead lock issue).
FreeRTOS requires your SysTick to work correctly. So, I recommend you to follow the UM1718 to configure sysTick with RTOS in section : Example of configuration using SysTick and FreeRTOS.
You can get more details on how to use the STM32Cube firmware with RTOS in this user manual UM1722 "Developing Applications on STM32Cube with RTOS" - comes also with description of a set of examples-
In the STM32CubeF4 package, you will find a FreeRTOS example which is available for boards marked with "x" in the table 1 from AN4739: STM32Cube firmware examples for STM32F4 Series, like: \STM32Cube_FW_F4_V1.26.1\Projects\STM32F412G-Discovery\Applications\FreeRTOS
Hope this helps you!
Please mark my answer as best by clicking on the "Select as Best" button if it helped =)
Imen