A Window Into Time by Peter F. Hamilton

A gifted teenager with total recall begins experiencing vivid, uncontrollable glimpses into the life of another boy living decades earlier; using his exceptional memory and modern sleuthing, he pieces together the identity behind the visions and the event that binds them, uncovering a hidden truth whose consequences ripple across time and forcing him to confront whether observation alone can change fate.

Purchase from Bookshop.org