Why does the ringtone gets quieter when someone calls?

Because you look at your phone! Seriously, recent iPhones come with FaceID and can recognize you. When the phone recognizes your attention there is no need anymore for loud sounds, so it can reduce the volume. Same goes for alarms and timers.

How can I force restart my iPhone 12?

  • press volume up
  • press volume down
  • press & hold power (side-button) until Apple logo shows up

See Apple Support Page