Pixhawk 2 vs Pixhawk 4, which one is better?

Good day,
there is difference be pixhawk 2.1 cube and pixhawk 4, the first difference is the stm32 arm processor and aside this also the hardware mounted on the board.
It depend on the use you must do and also the size of the drone.