Even if apples exit, no reason to suppose they are being baked into pies. They are a cultural thing, European, and only go back around 500 years.
IMNSHO, this is one of those areas where getting too deep into details of world building sometimes breaks immersion in a game more than it helps.
Do apples exist in the fantasy world? As a DM, you can certainly try to make the world feel more fantastic by having unique fruit. So instead of an apple you could have a smerp.
Do pies exist in the fantasy world? Well, not a traditional pie; that's too normal. But most cultures have some form of a fruit baked inside of a grain. So you can invent a baked good called a findangle.
And now your party is sitting in an inn, and the proprietor offers them a smerp findangle. And you have to tell them what a smerp is. What it tastes/smells like. Answer questions. Spend game time discussing how much it's like, but totally different from, an apple. And the you describe what a findangle is. What it tastes like. Answer questions about how it's made. Have the players make a joke about the Great British Bake Off. And then, maybe, someone asks about putting cheese on it. 10 minutes later, you're back to the story.
Or, you could just say "the proprietor offers you the local version of an apple pie". And then if it's relevant, the party can discuss the details and ask questions. Or they might be more immersed in the plot, and choose to ignore the smerp findangle side discussion. Minimal focus lost, even if someone asks for cheese on top. You can even have the talk about fruit and baked goods later, if someone want to circle back to it.