>>110288703The Elseworlds crossover and the season 7 finale should cover your bases.
Basically, Barry and Oliver learned about the impending Crisis, and Barry and Kara later sacrificed themselves to stop Doctor Destiny. Believing they were needed to prevent the Crisis, Oliver traded his life for theirs and agreed to help the Monitor prepare for the Anti-Monitor's arrival, knowing that at the end of everything he would die.
Oliver retired, married Felicity and they had a child, leaving Team Arrow to protect Star City. In the finale the Monitor arrived to take Oliver away to begin his mission journeying through the Multiverse running errands, and Earth-2 is the first stop.