Our first and most simple tip is to restart your iPhone. More often than not, turning your iPhone off and on again fixes the issue, so it’s generally the best place to start!

If you have a more recent version of an iPhone — X, 11, 12, or 13 — press and hold the volume and side buttons until the power off slider appears. Once it emerges, drag the slider, then wait 30 seconds for the gadget to completely shut off. Then, to turn it back on, press and hold the side button until the Apple logo materializes on the screen.

Source: https://www.distractify.com/p/why-does-my-iphone-keep-asking-for-my-apple-id-password