Simultaneous sampling with ADC - Portenta H7
The Arduino analogRead() function is a blocking function.  That means when you call it the code initiate an ADC conversion and then waits for it to complete and return you the value.  So using this method you cannot read two channels simultaneously.
To do what you are asking is a more advanced topic but basically the process is:

Setup timers in the STM32 to trigger conversions on ADC0 and ADC1 starting at the same time.
Have the ADCs generate an interrupt when the conversions are complete.
Read the ADC values in your interrupt routine directly from the ADCs registers without using analogRead().

Again, this is a more advanced topic.  As a beginner you may just want to live with the difference in times between the two readings until you build up some experience with the STM32.