We propose a Caputo-based fractional compartmental model for the dynamics of the novel COVID-19 epidemic taking into consideration social distancing and the influence of the environment. Using basic concepts such as continuity and Banach fixed-point theorem, the existence and uniqueness of the solution to the proposed model were shown. Furthermore, we analyze the stability of the model in the context of Ulam-Hyers and generalized Ulam-Hyers stability criteria. The concept of next-generation matrices was used to compute the basic reproduction number $R_0,$ a number that determines the spread or otherwise of the disease into the general population. Numerical simulation of the disease dynamics was carried out using the fractional Adam-Bashforth-Moulton method to validate the obtained theoretical results.