I have a theory! Since all darkhold copies are destroyed, and Strange has a photographic memory,
What if Doom learned this by looking through Doctor Strange's memory when he was captured?
if I had a nickel for every time a spider-man film's post-credits scene was used to tease a major Doctor Strange appearance, I would have two nickels,
which isn't a lot, but it's weird that it happened twice