  We compute the equation of state (EoS) of strange quark stars (SQSs) with the
MIT Bag model using density dependent bag pressure, characterized by a Gaussian
distribution function. The bag pressure's density dependence is controlled by
three key parameters namely the asymptotic value ($B_{as}$), $\Delta B(=B_0 -
B_{as})$, and $\beta$. We explore various parameter combinations ($B_{as}$,
$\Delta B$, $\beta$) that adhere to the Bodmer-Witten conjecture, a criterion
for the stability of SQSs. Our primary aim is to analyze the effects of these
parameter variations on the structural properties of SQSs. However we find that
none of the combinations can satisfy the NICER data for PSR J0030+0451 and the
constraint on tidal deformability from GW170817. So it can be emphasized that
this model cannot describe reasonable SQS configurations. We also extend our
work to calculate structural properties of hybrid stars (HSs). With the density
dependent bag model (DDBM), these astrophysical constraints are fulfilled by
the HSs configurations within a very restricted range of the three parameters.
The present work is the first to constrain the parameters of DDBM for both SQS
and HSs using the recent astrophysical constraints on tidal deformabiity from
GW170817 and that on mass-radius relationship from NICER data.
