sharing ideas for collaboration or working on them individually?
As a PhD student you are not usually required to have significant collaborations outside your school or department, although it does happen. So, if you are thinking about external collaborations, the first think you should do is talk to your advisor about it. Your advisor almost certainly has many connections in the field. Thus, they might be able to recommend someone to work with. But, they might also discourage this. You are (at least in theory) being trained by your supervisor. This gives them a greater responsibility for helping you develop your research abilities. Working with someone externally can put some of this burden onto them if your advisor isn't also involved.

For instance, I have a current PhD student that is part of an external collaboration, but I do some work to ensure that anything that we do that goes to our external collaborators is high enough quality that we aren't wasting their time. My colleague does something similar when his students work with me.

When I receive an unsolicited research request from a colleague's student, the first thing I do is contact their supervisor to see if they know about the request. I don't want to be seen as going behind their back to work with their student, and I wouldn't want someone else doing this with students I'm supervising.