In this paper, the possibility of existing a novel class of compact charged spheres based on a charged perfect fluid within the realm of gravity theory is explored. The authors started by proposing physically meaningful explicit formulas for the potential, denoted , and the electric field to find a close‐form solution. More precisely, the change of the dependent variable approach by exploiting the transformation is applied. Successively, the field equations analytically are solved and generate the most general solution, which leads us to examine various significant aspects of the stellar system. These aspects comprise the regularity of gravitational potentials, energy density and pressure, electric charge, the mass‐radius relationship, subluminal sound velocities in the radial direction, and the adiabatic index for charged compact stars. For a more in‐depth system study, mass measurements using contour diagrams are carried out. This mainly involves varying the variable parameters and to distinguish their effect on the mass distribution within the stellar structure. What is more, the electric charge controls the stability of the stellar system is shown, which yields that a stable system can possess a maximum charge of order . The results strongly argue that charged stars could conceivably exist in nature and that such a deviation from traditional theories may be seen in future astrophysical observations.