If your residence permit is valid for more than a year, you should contact Skatteverket to get a personal number and register.