To unlock the true ending of Xenoverse 2, you must complete quests in the Time Rifts in order to get all five Distorted Time Eggs.
1. Hercule's House Egg
Visit Hercule's House and turn right to enter the courtyard. You must complete the 6 Saiyaman Quests to get this egg. If they aren't in the courtyard, you must talk to them at the Resort District or Kame House first.
2. Capsule Corporation Egg
Go to the Capsule Corporation and talk to Vegeta. If he doesn't challenge you to a battle, you need to level up first. You must win all four fights with Vegeta to get this egg.
3. Guru's House Egg
After you've accepted a quest at Guru's House, you'll occasionally receive notifications that the area is under attack. During attacks, Nail will give you a quest to defend the house. In these quests, you'll need to defend the house from enemies while also collecting Dragon Balls. You must complete ten of these quests to get the egg.
4. Majin Buu's House Egg
At Majin Buu's house, you need to feed Majin Buu. You can find food in blue orbs at Conton City. Once you feed him enough for him to have six children, he'll give you the egg.
5. Frieza's Spaceship Egg
Join Frieza at his spaceships and do quests there until Frieza offers you quests himself. You may need to spend some time in the game doing other things before new quests become available. The game will notify you when a new mission is available. You need to complete all 17 of Frieza's quests to get the egg.
Unlocking the Secret Mission
Once you have all five Distorted Time Eggs, give them to the Supreme Kai and then talk to Trunks. This will unlock the secret mission, "Unknown History." Complete this mission to unlock the true final boss fight and the secret ending.