They Both Die In The End by Adam Silvera

Two teenage boys in a near-future New York each receive a call telling them they will die within 24 hours; strangers until that moment, they connect via an app that pairs people facing their last day and decide to spend their remaining hours together, forming a powerful, intimate bond as they confront fear, love, family, identity, and what it means to truly live when time is suddenly precious.

Purchase from Bookshop.org