The number of Methicillin-resistant Staphylococcus aureus (MRSA) cases in communities and hospitals is on the rise worldwide. In this work, a nonlinear deterministic model for the dynamics of MRSA infection in society was developed to visualize the significance of awareness in interventions that could be applied in the prevention of transmission with and without optimal control. Positivity and uniqueness were verified for the proposed corruption model to identify the level of resolution of infection factors in society. Furthermore, how various parameters affect the reproductive number R0\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$${R}_{0}$$\\end{document} and sensitivity analysis of the proposed model was explored through mathematical techniques and figures. The global stability of model equilibria analysis was established by using Lyapunov functions with the first derivative test. A total of seven years of data gathered from a private hospital consisting of inpatients and outpatients of MRSA were used in this model for numerical simulations and for observing the dynamics of infection by using a non-standard finite difference (NSFD) scheme. When optimal control was applied as a second model, it was determined that increasing awareness of hand hygiene and wearing a mask were the key controlling measures to prevent the spread of community-acquired MRSA (CA-MRSA) and hospital-acquired MRSA (HA-MRSA). Lastly, it was concluded that both CA-MRSA and HA-MRSA cases are on the rise in the community, and increasing awareness concerning transmission is extremely significant in preventing further spread.