Nowadays, all scientists are in the race to find a cure for COVID-19. This is a viral disease that is due to severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2). Different antiviral drugs are under investigation. Dexamethasone is being used for the treatment of COVID-19. In this article, the chemical structure of dexamethasone is explored using computational techniques such as topological indices. Proofs of a few closed formulas that describe the degree-dependent topological indices calculated from the M-polynomial of the graphs are also given in this article.