Etymology of 于 and transformation to in, on, at, go to Two possibilities for the object of representation 于 are:

Pictogram (象形). An ancient wind instrument; early form of 竽 (OC *ɢʷa). This view is supported by mainstream palaeography.

Exhaled air; early form of 吁 (OC *qʰʷa, *ɢʷas, “to sigh”). Shuowen considers it to be an ideogrammic compound (會意): 一 (“flat stream of air”) + 丂 (“to exhale”). Compare 乎, 兮, 号.


I tried to google 竽, but could not find the ancient wind instrument. could you please link to this instrument they are referring to? In this case how is the meaning transformed to “in, on, at, go to”?
I was searching for 由于 yóuyú 'due to'. 由 'reason' + 于 'go to'?
Tl;dr: see points 1. and 6.

The explanation of function words (虛詞) is already difficult (see point 2.), let alone their etymology (history of grammaticalisation, i.e., how they evolved from words of content (實詞) to words that have grammatical function but little semantical significance; in this case, a preposition).

Historical annotations for function words were often noted to be inaccurate, even far-fetched (穿鑿附會).1 (Wonderful examples in the source, but I don't intend to list them here out of irrelevance to your question.)

Of course, in terms of etymology, there are fairly logical ones like 在 (it has the semantic component 土 which confers a sense of physical existence or presence, see here). But we don't expect a simple answer for 于: even its etymology as a content word – i.e., a wind instrument or the act of exhalation – is controversial, as you have duly mentioned.

One writes 由於 instead of 由于 in traditional Chinese. This further complicates your problem; how do we account for the fact that 於 is a pictogram of a bird (see here), and how do we explain 於/于 equivalence in modern Chinese? Phonetic loan is most likely, but still, there are people who consider 於/于 to be semantically distinct.2

For the reasons above, my sincere advice is that you abandon the etymological route of memorisation for function words and memorise them as-is through exposure.

In classical Chinese, 於 already possesses the meaning 由於 ('due to'):

業精於勤，荒於嬉。韓愈《進學解》
Progress in studies comes from diligence and is retarded by indolence.

The addition of 由 ('from'; see 由來, 緣由) is a way of limiting the polysemy of 於. When A emerges 'from' B, you establish causality between the two.


References
1 尹黎雲（1989）〈文言虛詞訓詁十弊〉辭書研究，4，69–77。
2 楊世鐵（2015）〈從“于 / 於”用法上的變化看複合詞“於是”的產生〉中國語文通訊，94(1)，27–43。 http://www.cuhk.edu.hk/ics/clrc/crcl_94_1/yang.pdf