STM32CubeMX does not (yet) know where the function calls should best be placed.
You can manually reorder the generated function calls within STM32CubeIDE (embedded STM32CubeMX) as well as in the standalone STM32CubeMX:
- on the top select tab Project Manager
- on the left select Advanced Settings
- select the function call to be moved, e.g. MX_ADC1_Init();
- click on the tiny, tiny move button above the blue header of the table (top right) to move it to the desired position
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter