This paper is based on the study of compact stars in the context of electric fields and the nonmetricity effects of gravity. Due to this, we are motivated to build stellar models based on spherically symmetric space-time in f(Q) gravity. The space-time solution is obtained by Durgapal and Bannerji (Phys Rev D 27:328–331,1983) potential along with modified Van der Waals equation of state (EoS) p_r=eta rho ^2+ frac{beta rho }{gamma rho +1} by introducing a specific form of electric charge function q(r)=kr^3. In order to validate our charge model, we used observational data from the literature for celestial objects like Her X-1, 4U 1538-52, SAX J1808.4-3658, and SMC X-1. Furthermore, we have also retrieved the uncharged effects of gravity for the model SMC X-1 by taking k=0. Our present physical analysis shows that all the obtained features for the present solution are in excellent agreement with the viable model as far as observational data is concerned.