The lack of housing is a general challenge in Stockholm, but especially for newly arrived PhD students (and even more so for new arrivals from other countries).

KTH has a new initiative called KTH Relocation to help with relocation-related issues (both moving to and away from Sweden) for PhD students, university employees, etc.

If you are a member of THS, you can join the SSSB student housing queue.
Moreover, you can apply for the housing as a student on Bostadsförmedlingen website.
Also don’t forget to check Akademisk kvart website.