When you look into the wish trope, you tend to get pointed back to Aladdin from The Book of One Thousand and One Nights as the originator. But wishes in Aladdin really didn't work the way modern wishes do.
Modern wishes are covered with rules, you've got lists of things you just arbitrarily can't do because they would break the plot and/or be morally skeezy. They're legalistic and limiting, doing precisely what you say and nothing more even if common sense would say it should, because the story loves it some unexpected consequences. And you only get so many so you can't just address every problem in the story by throwing wishes at it until it stops being a problem. They're usually things that just happen, ontologically fundamental bits of the story which just happen, mechanism be damned.
Here's the jinn from Aladdin:
“Say whatso thou wantest of me? Here am I, thy Slave and Slave to whoso holdeth the Lamp; and not I alone, but all the Slaves of the Wonderful Lamp which thou hendest in hand.”
Here are some wishes being granted:
“O Slave of the Lamp, I am unhungered and 'tis my desire that thou fetch me somewhat to eat and let it be something toothsome beyond our means.” The Jinni disappeared for an eye-twinkle and returned with a mighty fine tray and precious of price, for that ‘twas all in virginal silver and upon it stood twelve golden platters of meats manifold and dainties delicate, with bread snowier than snow; also two silvern cups and as many black jacks full of wine clear-strained and long-stored.
“Ask, O my lord, whatso thou wantest.” The other replied, “I have demanded of the Sultan his daughter to wife and he hath required of me forty bowls of purest gold each weighing ten pounds and all to be filled with gems such as we find in the Gardens of the Hoard; furthermore, that they be borne on the heads of as many white handmaids, each attended by her black eunuch-slave, also forty in full rate; so I desire that thou bring all these into my presence.” “Hearkening and obeying, O my lord,” Quoth the Slave and, disappearing for the space of an hour or so, presently returned bringing the platters and jewels, handmaids and eunuchs; then, setting them before him the Marid cried, “This be what thou demandest of me: declare now an thou want any matter or service other than this.”
“Ask, O my lord whatso thou wantest;” and Alaeddin rejoined, “I require thee of a service grave and important which thou must do for me, and 'tis that thou build me with all urgency a pavilion fronting the palace of the Sultan; and it must be a marvel for it shall be provided with every requisite, such as royal furniture and so forth.” The Slave replied, “To hear is to obey.” It hath reached me, O King of the Age, that the Slave evanished and, before the next dawn brake, returned to Alaeddin and said, “O my lord, the pavilion is finished to the fullest of thy fancy; and, if thou wouldst inspect it, arise forthright and fare with me.”
And all this was the work of one night.
There's no limit on how many wishes can be granted, there don't really seem to be things the genie will refuse to do on moral grounds or whatever, the jinn is doing what Aladdin tells him to, but isn't exactly doing just enough and nothing not explicitly stated. The Jinn takes time to do big things, he's clearly using some sort of mechanism to get things done. He doesn't even seem to be granting concrete "wishes" so much as just "doing things that Jinns do while serving his master".
So, what story did the modern wish, or at least its characteristic embellishments, actually come from?