How is silicon for ICs produced?
They start with a seed crystal and grow it into a long ingot by pulling it out of molten silicon.

Try reading this on how they process silicon from sand:
https://www.pveducation.org/pvcdrom/manufacturing/refining-silicon

I don't know if solar grade and electronic grades differ.  I'm sure they do but it will give you an idea.  I hope this answers your question.