Several classes are discussed in this paper, including susceptibles, vaccinates, acutes, chronics, hospitalized, and recovered. In terms of dynamic behaviour, the model provides a substantial description of Hepatitis B. Hepatitis B transmission dynamics and infection risk can be predicted using the model. A vaccine strategy or intervention can also be identified using it. Given the initial positive data, the model possesses a bounded, unique, and positive solution. Furthermore, we have established the model's stability through the application of stochastic Lyapunov functional theory. The examination of an infection's stationary distribution and potential extinction is conducted under specific conditions. Both stochastic and deterministic control problems were scrutinized, with optimal control theory employed to manage the external control measures for the disease's containment. The analytical findings have been elucidated through graphical representations.