I have come across three different result complements that can be associated with the verb 买: 好，到 and 上. My broad understanding is that all three of them somewhat convey the idea of "managing to buy", but I am confused as I do not understand the nuances and I don't know which one can be used in which context. Can you please help me differentiate them and their use? Many thanks!!
The nuances I see in the usage of these three result complements are subtle.
好 as a result complement is similar to 完 and 到 as it describes the completion of an action, but it also adds that the action has been completed properly. As 好 itself means "good", you see how this nuance comes about.
- 我今天已经买好菜了 = today I've already bought groceries (all those you needed; the task is properly done)
到 means that the successful completion of the action was not entirely sure. It follows from an attempt or intent. There is more volition, and sense of purpose. As 到 itself means "to arrive", as a result complement the nuance is like reaching a target.
- 我今天已经买到菜了 = today I've already bought groceries (the outcome wasn't sure, but you still made it; you managed to buy them)
上 is relatively more rare in the sense of completion. I suspect it might be even non-standard, but spread among native speakers enough to be considered acceptable. The result itself is more often used to describe that something is on (literally and figuratively), or that the action has successfully started, and ongoing e.g. 穿上衣服 (put clothes on) 带上东西 (bring/carry things with you).
- 今天我一天超累，终于吃上饭了 = today I'm super tired, I finally could eat something (likely still eating at this time)
So with 买：
- 我今天已经买上菜了 = today I've already bought (started buying?) groceries (you got to buy them, maybe still in the process)
That's why 买上 is used less often, it doesn't always work with 买, since "buying" as an action in progress can be expressed just better with 在 （我在买菜 = I'm buying groceries). However it can be used just like 到, and some native speakers do use it like that. Yet if you Google 买到了 and 买上了 in quotes (adding 了 to force search results to be verbs, and not some other part of speech), 买到 returns 5 times more results than 买上.
As a final remark, 买上 may have an additional nuance of being able to afford something. Note that the proper way to say "afford" is with the 起 result （买得起 / 买不起）. The result 上 may suggest that you could successfully buy something because you are financially capable to do so.
- 我买上房子了 (I bought a house = I was financially able to get "on top of the price", or something like that)
买上了 denotes you manage to get it. It expresses you got the chance to get it, not quite focusing on the actual result you got it already.
买到了: you already got it. It expresses the result you got it.
买好了： 好 denotes the sense OK, fine, or well covered. 买好了implies that I got this buying covered, so we don't have to worry about it.