According to Brahmandapurana, it was said that Lalithaparabhattaarika or Adiparasakti is the supreme goddess and she has power over all this creation. It was stated that she has created the numerous galaxies and all. She has created a Brahma, a Vishnu and a Shiva for all the other galaxies just like ours.
Brahma is the creator (looks after the creation and births of all the living species), Vishnu is the preserver (takes care of everything and maintains the order and balance in the world) and Shiva is the destroyer (handles the death and rebirth of living species and looks after the journey of the soul)
As well, she has created goddesses Saraswati, Lakshmi and Parvathi to bless the beings on earth with enough knowledge and skill, with prosperity and wellness, and with health and to protect from evils. In the same way, she has created many other gods and assigned different duties to them, who bless the beings on earth according to their deeds.
There is nothing like give and take policy as if you offer or sacrifice something to god and your physical needs get fulfilled. It is always a blessing that comes with respect to your intentions in your life. Though the temporary results seem to be positive and convenient, the permanent and final result will always be the cumulative effect of your deeds and intentions, where you get numerous chances to correct yourself or destroy yourself, throughout the life.
Worshipping different gods for different causes, for example, Hanuman for strength and optimism, Saraswati for studies and knowledge, Lakshmi for wealth and prosperity etc. make us believe in the deeper philosophical aspects such as believing in God, in all walks of life. This enables you to see god in every positive corner of your life and gives you the courage to face any problem. This belief fills your spirit with positivity, yet makes you independent.
You might wonder whether why do we love these “local gods” of our galaxy, while we have the supreme goddess who controls all of them. Well, let me ask you one thing. You know that your grandfather is elder to your father. Still, why do you love your father?
Hope you got your answer!!