Two-dimensional materials have attracted the attention of many researchers. Especially in transition metal dichalcogenides (TMDs), WS2 has great surface to volume ratio, a wide range of band gaps, high thermal and oxidative stability. It also has peak carrier mobility and less effective mass than other TMDs, leading to its use in many applications, including solar cells, LED, rechargeable batteries and sensors. We have analyzed the stability and electronic properties of monolayer and doped WS2 with Cobalt, Iron, and Nickel using density functional theory. The stability of the system has been studied by the formation energy. The electronic properties were analyzed by band structure, the density of states, charge transfer, chemical potential, and total energy of the systems. These results predict that the formation energy of the doped system increases with a negative magnitude which proves that the doped structures are more stable. Comparing the WS2 monolayer with the transition metal doped WS2, we have observed reasonable changes in the band structure and density of states. Doped WS2 shows better results than monolayer WS2 in stability and improved electronic properties. These results may provide a prospective insight for making a gas sensing device