You say ho comprato molto verdure, and the person you are talking to understands you perfectly and says nothing. That is the shape of this mistake: it never stops the conversation, so nobody corrects it, and you keep making it for years.
Molto does two different things, and the ending tells you which. When it means “very”, it modifies an adjective or an adverb and never changes: sono molto stanca, parla molto bene. When it means “a lot of” or “many”, it modifies a noun, and then it behaves like any adjective and agrees with that noun in gender and number.
So the sentence that gives everyone away, ho comprato molto verdure, is not a spelling slip. It is molto doing the “many” job while still wearing the “very” ending. Verdure is feminine plural, so molto has to follow it: molte verdure. The same rule produces molti libri, molta pazienza, molto tempo.
Ho comprato molte verdure al mercato.
Le verdure al mercato sono molto fresche.
Four endings cover every case of the “many” job, and you already know them from any other adjective. Molto before a masculine singular noun, molta before a feminine singular one, molti before a masculine plural, molte before a feminine plural. The noun decides, and the noun is usually the next word, which is what makes this fixable while you are speaking.
Ho molti amici a Bologna, e molta strada da fare con l’italiano.
Ci vuole molta pazienza, ma non ci vuole molto tempo.
The edge that trips people up
The rule stops being simple when molto means “very” in front of a plural adjective. The adjective agrees, molto does not, and the two words sit next to each other with different endings, which feels wrong every time.
Le scarpe sono molto comode.
There is also the case where the next word is an adjective and molto agrees anyway, because the adjective is standing in front of a noun. Italian puts a few common adjectives there (bello, buono, piccolo, grande), and molto looks past them to the noun underneath.
Ha molti bei libri e molte belle idee.
Molto also stays flat before a comparative, where English uses “much”: questa strada è molto più lunga, sto molto meglio, è molto meno caro. Nothing is being counted there either.
Two more cases are worth knowing. Molto can stand alone, without a noun, and then it agrees with the people or things it stands for: molti pensano che l’italiano sia facile, “a lot of people think Italian is easy”. And gente is grammatically singular in Italian even though it means a crowd of people, so it is molta gente, never molte gente, however plural it feels in English.
The same split runs through the whole family. Tanto, troppo, poco and quanto all take an ending in front of a noun and go flat in front of an adjective or an adverb: troppi messaggi but troppo tardi, poca acqua but poco chiaro, quante volte but quanto costa. Getting molto right gets you four more words at the same time.
How to hear it
Ask what molto is pointing at. If it is pointing at a noun, directly or through an adjective sitting in front of one, the ending moves with that noun. If it is pointing at an adjective or an adverb with no noun behind it, molto does not move at all.
If that is one thought too many mid-sentence, try dropping the word instead. If the sentence still counts things without it, molto was doing the “many” job, and it agrees. If dropping it only makes the sentence milder, it was doing the “very” job, and it stays as it is.
If you would rather not think, learn the pairs as sounds instead of as rules. Molto bene, molto meglio, molto tardi, molto gentile. Molte volte, molte cose, molta gente, molti anni. Italians say these constantly, and after enough of them the wrong ending starts to sound off before you can explain why, which is the only version of this knowledge that survives a real conversation.