In late 2019, coronavirus disease 2019 (COVID-19) caused severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2). Spike protein is one of the surface proteins of SARS-CoV-2 that is essential for its infectious function. Therefore, it received lots of attention for the preparation of antiviral drugs, vaccines, and diagnostic tools. Herein, we use computational methods of chemistry and biology to study the interaction between spike protein and its receptor in the body, angiotensin-I-converting enzyme-2 (ACE2). Additionally, the possible interaction of two-dimensional (2D) structures, including graphene, bismuthene, phosphorene, p-doped graphene, and functionalized p-doped graphene, with spike protein is investigated. The functionalized p-doped graphene nanosheets were found to interfere with spike protein better than the other tested nanomaterials. In addition, the interaction of the proposed nanosheets with the main protease (Mpro) of SARS-CoV-2 was studied. Functionalized p-doped graphene nanosheets showed more capacity to prevent the activity of Mpro. This 2D structure efficiently reduce the transmissibility and infectivity of SARS-CoV-2 by both the deformation of the spike protein and inhibiting the Mpro. The results suggest the potential use of 2D materials in a variety of prophylactic approaches, such as masks or surface coatings, and would deserve further studies in the coming years.