Special and general relativity are the framework for understanding how the universe functions when we are considering very large and/or objects which are approaching the speed of light. Quantum mechanics is concerned with how the universe functions over distances measured on the atomic and subatomic scale. There are two points to bear in mind with quantum mechanics:
1. It works, its predictions have been verified accurately thousands (if not more) times.
2. It is fiendishly complex and at times downright weird and as such very few cosmologists actually understand (in the truest sense of the word) all aspects of what is termed Quantum Mechanics.