https://learnmeabitcoin.com/technical/block/time/
Here is a good explanation
https://en.bitcoin.it/wiki/Block_timestamp
"A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours. "Network-adjusted time" is the median of the timestamps returned by all nodes connected to you. As a result block timestamps are not exactly accurate, and they do not need to be. Block times are accurate only to within an hour or two."
https://learnmeabitcoin.com/technical/block/time/
Here is a good explanation
I found this screenshot of another example from a few years ago 