The Shattering of Adonalsium was the major event to occur within the cosmere, during which were created the sixteen Shards, which were taken up by sixteen different Vessels, who from there on became known as Shardholders. Hoid was witness to it, though whether he simply observed it or caused it remains in question. Be that as it may, the event was intentional. Whether the intent was malevolent or otherwise also remains in question.
|“|| "Anyway, there was a God. Adonalsium. I don’t know if it was a force or a being, though I suspect the latter. Sixteen people, together, killed Adonalsium, ripping it apart and dividing its essence between them, becoming the first who Ascended."
" ... Some wished for the power; others saw killing Adonalsium as the only good option left to them. Together they murdered a deity, and became divine themselves."
"So ... my world, and everyone I know, is the creation of a pair of ... half gods?"
"More like fractional gods. And ones with no particular qualifications for deityhood, other than being conniving enough to murder the guy who had the job before."''
At the time of the Shattering, Adonalsium (hence, the Shards) was/were presumably on Yolen. However, after the Shattering, Autonomy (for example) went to Taldain, but Investiture had been assigned to her on First of the Sun.
Further, after the Shattering, but before they started created humans (or something other), all Shards had roughly the same amount of raw power.
A. Some worlds had people before the Shattering.
Q. Before Adonalsium was shattered, was there magic in the Cosmere and what form did it take?