Because of the war in Bosnia, basically. By 1992, Yugoslavia (originally 6 republics) was down to just Serbia and Montenegro since the others seceded. Because Serbia was seen as the agressor in the war and the country was sanctioned by NATO, it was forbidden from participating in the Olympics. At that point, we had some really good talent. Most of our legends and who ended up having successful careers in Europe were in their prime at the time or close to becoming and that's not even considering Kukoc and Petrovic who we lost because Croatia seceded. Most names I'll throw up will not ring a bell but Dejan Bodiroga, Sasa Djordjevic, Zarko Paspalj, Predrag Danilovic, Vlade Divac, Zeljko Rebraca, Dejan Tomasevic, etc were all dope as fuck in the 90s. Divac rings a bell but yeah lol.
But yeah, I don't think we have the most gold medals, I think USSR does, but we have the most overall. But yeah, if we could combine Slovenia, Montenegro, Croatia, Bosnia, and Macedonia, we'd be killing Europe every tournament. Spain wouldn't be shit. Hell, just give us a few Croatians and Slovenians lol.