Answer in Details
If you seek solitude and less distraction, a room can offer that, allowing you to focus like Shiva in meditation. However, if you value the community and collective energy of a hostel, remember that Shiva also embraces all beings and situations with equanimity.
Pray to Lord Shiva for clarity and guidance. Chanting "Om Namah Shivaya" can help calm your mind and bring wisdom. Ultimately, choose the place where you feel you can best cultivate inner peace, discipline, and focus on your studies, just as Lord Shiva remains undisturbed in his tapasya (austerities), no matter where he resides.