Together with Brahma, Shiva and Vishnu were later conceived to be a group of three gods that together managed the universe.
In this conception, Brahma started the world, Vishnu maintained it (through his avatars), and Shiva destroyed all of this (so that it could be reborn in a new yuga or era).
Collectively, these deities were called the Trimurti (“three forms of God”).