The modified theories of gravity have received a lot of attention in the last decade. These theories aim to describe the accelerated cosmic expansion by altering the theory of gravity, instead of introducing dark energy. The major goal of this research is to examine the spacetime surrounding charged compact star configurations in the context of $$f(\mathcal {R},\mathcal {T})$$ gravity and develop a workable model employing the Buchdahl metric potential (Phys. Rev. D 116, 1027 (1959)). We consider a simplified separable linear form for arbitrary function $$f(\mathcal {R},\mathcal {T})$$ given by, $$f(\mathcal {R},\mathcal {T})=\mathcal {R}+2\zeta \mathcal {T}$$ with the matter Lagrangian $$\mathcal {L}_\mathcal {M}=\rho$$ to depict the full solution of the modified field equations for the considered matter distribution. We assess various key characteristics, including effective energy density, effective pressure, sound velocities, relativistic adiabatic index, all energy conditions, and surface redshift, to determine the model’s physical viability and stability. For this investigation, we consider a rotating neutron star with isotropic configurations, namely Hercules X-1, as testing candidate. We also examine the effect of coupling constant $$\zeta$$ on the physical attributes of our model. The investigation illustrates that all our derived results lie within the physically accepted regime, demonstrating the model’s feasibility in $$f(\mathcal {R},\mathcal {T})$$ gravity.