In this paper, we explore the existence of spherically symmetric strange quark configurations coupled with anisotropic fluid setup in the framework of modified Gauss–Bonnet theory. In this regard, we adopt two models such as (i)f(G)=βG2, and (ii)f(G)=δ1Gx(δ2Gy+1), and derive the field equations representing a static sphere. We then introduce bag constant in the gravitational equations through the use of MIT bag model, so that the quarks’ interior can be discussed. Further, we work out the modified equations under the use of Tolman IV ansatz to make their solution possible. Junction conditions are also employed to find the constants involved in the considered metric potentials. Afterwards, different values of model parameters and bag constant are taken into account to graphically exploring the resulting solutions. This analysis is done by considering five strange quark objects like Her X-I, LMC X-4, 4U 1820-30, PSR J 1614-2230, and Vela X-I. Certain tests are also applied on the developed models to check their physical feasibility. It is much interesting that this modified gravity under its both considered functional forms yield physically viable and stable results for certain parametric values.