Numbers 11:21:
וַיֹּאמֶר֮ מֹשֶׁה֒ שֵׁשׁ־מֵא֥וֹת אֶ֙לֶף֙ רַגְלִ֔י הָעָ֕ם אֲשֶׁ֥ר
אָנֹכִ֖י בְּקִרְבּ֑וֹ וְאַתָּ֣ה אָמַ֗רְתָּ בָּשָׂר֙ אֶתֵּ֣ן לָהֶ֔ם
וְאָכְל֖וּ חֹ֥דֶשׁ יָמִֽים׃
And Moses said: ‘The people, among whom I am, are six hundred thousand
men on foot; and yet Thou hast said: I will give them flesh, that they
may eat a whole month!
You can understand the difference clearly via Sifrei Bamidbar 95:1. I am excerpting some parts from Sefaria.org's English translation:
R. Shimon b. Yochai said: R. Akiva expounded this in one way,
and I, in two ways, and my words seem more cogent. R. Akiva expounds
it plainly, viz. (Ibid. 22) "If flocks and herds are slaughtered for
them will it be sufficient for them?" Even if you give them all the
flocks and herds (in the world), will it be sufficient for them? And I
understand it as follows: "If flocks and herds are slaughtered for
them will it be sufficient for them?" Even if you give them all the
flocks and herds in the world, they would grumble. For is it because
they have no meat that they are grumbling? Is it not written of the
exodus from Egypt (Shemot 12:38) "And also a great mixture (of
proselytes) went up with them, and flocks and herds, etc."? I might
think they ate them in the desert. It is, therefore, written (Bamidbar
32:1) "And the sons of Reuven and the sons of Gad had much cattle,
etc." It is only that they were looking for a pretext to abandon the
L-rd. (Ibid. 11:22) "If all the fish of the sea are gathered for
them"? Even if you gave them all the fish in the sea they would
grumble. For is it because they have no fish that they are grumbling?
Did not the well of Miriam accompany them in the desert and supply
them with more than their fill of fish? It is only that they were
looking for a pretext to abandon the L-rd.
In short, in the 1st occurrence, in Exodus, they didn't have food because the dough (matzah) ran out. So asking for bread was legit. Asking for meat wasn't as legit. because, technically, man does not need meat to survive. But G-d accommodated them, at that time.
In the 2nd situation, it was clear that they had sufficient food and fish, among other items. There was no reason to complain.