Despite persistent rumors, you cannot obtain a Master Ball in Jubilife City. The game gives you exactly one guaranteed Master Ball—and you have to earn it.
After defeating the 7th Gym, you'll infiltrate Galactic HQ. Cyrus hands over the Master Ball as part of the story. That's your one sure thing. Use it wisely—Mesprit or Cresselia (roaming legendaries) or a shiny legendary are the conventional targets.
Save the Master Ball. The game won't give you another.