A nebula is a common feature of our universe, consisting of gas particles and dust which are closely associated with…