1 Introduction

We are currently experiencing an accelerated expansion of the universe, as evident from several observations, including (i) type Ia supernovae [1,2,3,4,5], (ii) cosmic microwave background radiation [6, 7], (iii) large-scale structures [8], (iv) Planck satellite data [9,10,11], and (v) baryon acoustic oscillations [12]. This new feature of late-time acceleration of the universe is posing a significant challenge to the standard theory of gravity, i.e., Einstein’s general relativity (GR). Hence, to explain this enigmatic phenomenon, GR is invoking an exotic agent, known as dark energy (DE), which has been thought to be a possible candidate for pushing spacetime in an outward direction. Interestingly, the erstwhile cosmological constant \(\Lambda \), which was introduced by Einstein to obtain a static universe based on his GR, is now taking on the role of this DE. However, to cope with the expanding universe situation, the constant \(\Lambda \) is in general to be considered as a dynamic parameter depending on the spacetime fabric, i.e., \(\Lambda = \Lambda (r)\), which acts as a repulsive pressure. Nevertheless, the existence of DE is even now in an illusive stage.

As a consequence, several scientists have put forward a number of new concepts to overcome this DE-related unacceptable odd situation. Time and again they have proposed an alternative gravity theory in the place of GR which could comprehensively describe the accelerating expansion of the late-time universe. As a result, we have obtained a proper gravitational substitute for the dark energy scenario as far as consequential theoretical prediction and observational evidence are concerned. In all these theories, the modification has been attempted via the Einstein–Hilbert action with suitable changes which are expected to make evolutionary features of the universe physically viable. Therefore, beginning with Buchdahl [13] and followed by Nojiri et al. [14], Carroll et al. [15], and Cognola et al. [16], a plethora of modified theories have arisen in the gravitational arena to couple the theory with the observational status of both the early- and late-time universe [17]. In the late-time acceleration phase of the universe, f(R) gravity, the scalar curvature R took on the controlling role in the Einstein–Hilbert action to explore and describe the spacetime expansion in a justified manner. Later on, f(RT) gravity theory was suggested by Harko et al. [18], assuming that it will be responsible for the shift in the geometrical part of the Einstein–Hilbert action.

Basically, this theory originated to consider the Lagrangian as a function of both R and T, where the latter is the trace of the energy–momentum tensor, with ample applications in the fields of astrophysics and cosmology [19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]. A few basic aspects of f(RT) gravity theory, which have been described in the review work [45], are as follows: (i) the trace of the energy–momentum tensor T and the Ricci scalar R have deep intrinsic properties related to the matter Lagrangian, (ii) T can also be made to account for heat conduction and viscosity, and (iii) the quantum field effect and the resultant particle creation phenomena are also attributable overall to f(RT) gravity theory. Subsequently, several other variants have been introduced by modifying the geometric term of the action, e.g., f(G) gravity [46, 47], where G is the Gauss–Bonnet scalar. There is another variant of f(R) gravity theory in the form of f(RG) gravity theory, where G, which stands for the Gauss–Bonnet invariant, can describe the inflationary and late-time acceleration phases [18, 49,50,51,52,53,54,55,56,57,58,59,60,61,62]. It is especially worth noting that f(R) gravity fails to support the solar system tests [63, 64]. In this context, other anisotropic solutions for compact star models in different aspects including \(f(\mathscr {T})\) gravity can be found in Refs. [65,66,67,68,69].

In connection to f(Q) gravity, there have been several applications in both the astrophysical and cosmological realms, e.g., f(Q) extended symmetric teleparallel theory to account for bouncing cosmology [70], the presence of bulk viscosity effects in the cosmological fluid [71], a gravitational modification class via non-metricity [72], the function of bulk viscosity [73], traversable wormholes with normal matter [74], for spherically symmetric and stationary metric-affine spacetimes [75], reconstruction formalism of the Dirac–Born–Infeld (DBI)-essence scalar field model [76], and periodic cosmic transit behavior of the accelerated universe [77]. Moreover, Errehymy et al. [78] recently investigated the characteristics of electrically charged strange-type compact stars under f(Q) symmetric teleparallel gravity, whereas cosmic acceleration and dark energy on the basis of homogeneous and isotropic Friedmann–Laîmatre–Robertson–Walker (FLRW) geometry were studied by Koussour et al. [79].

Another modified gravity theory, namely \(f(\mathscr {T})\) [80, 81], seems very promising to describe several cosmological and astrophysical problems ([82] and other references therein). This theory, where \(\mathscr {T}\) acts as an arbitrary function of the torsion scalar, can reasonably (i) provide a theoretical interpretation of the late-time acceleration of the universe, (ii) accommodate the regular thermal expanding history including the radiation- and cold dark matter-dominated phases, (iii) achieve the inflationary phase via non-singular bounces which helps, and (iv) investigate the feature of cosmic microwave background observations. Our present investigation is therefore based on this theory, which we would like to apply for understanding various physical situations in connection to compact stars, in particular pulsars.

In the present investigation, with the model being treated for compact stars, we are considering pressure anisotropy. This means that the radial pressure differs from the transverse pressure and hence will produce unequal principal stresses. However, Dev and Gleiser [83] showed that the equality of the transverse components of the pressure ensures the spherical symmetry of the model. Now, there may be several reasonable physical phenomena behind the origin and development of anisotropy in the interior or core structure of a compact star. These include (i) exotic phase transition at extreme density [84], (ii) the presence of a type II superconductor inside the compact stars [85], (iii) pion condensation [86], (iv) type 3A superfluid [87], a (v) strong magnetic field [89], and (vi) a scalar field in a boson star that may give rise to anisotropy [90]. Long ago, Ruderman [88] argued that local anisotropy in compact stars is due to the solid core, which was later proposed in a definitive manner by Herrera and Santos [91].

With respect to this connection, we would also like to mention here that the pressure anisotropy might have a significant role in the structural formation of a compact star, and thus its internal features will be dependent on anisotropy in various ways. Keeping this aspect in mind, Karmarkar et al. [92] argued that the numerical value of the compactness parameter (i.e., \(\frac{2M}{R}\), where M and R are the mass and radius of the star, respectively) may approach unity for anisotropic stars. Interestingly, for anisotropic stars, Ivanov [93] specifically demonstrated that the upper limit of the surface redshift becomes 3.842 and 5.211 when the transverse components of the pressure satisfy the strong and the dominant energy conditions, respectively. To account for the numerical feature of the pressure anisotropy, Mak and Harko [94, 95] verified that it must be greatest at the surface and zero at the center of the compact physical object.

We have already mentioned the reasons for choosing \(f(\mathscr {T})\) gravity as our motivation for carrying out investigations in the field of compact stellar models. Under a system with an anisotropic fluid in the framework of \(f(\mathscr {T})\) gravity, the present investigation therefore aims to explore physically viable compact stars so that the model parameters under suitable and permissible constraints can provide acceptable features which should have admittance with the observational signatures. More clearly, in the present work our main motivation is to study the spherically symmetric object under this modified gravity associated with anisotropy in two categories: (i) to examine the behavior of physical attributes of the configuration of compact stars and (ii) to both compare and constrain the theoretical model parameters with the available dataset from the observational evidence. At this point, we should mention that, like \(f(\mathscr {T})\) gravity, one special advantage in f(Q) gravity is that a second-order differential equation arises instead of a fourth-order differential equation in f(R) gravity and has several similar features to \(f(\mathscr {T})\) gravity.

At this juncture we would like to mention that in the present work we have assumed “static” compact stars where we match the interior solution to the exterior Schwarzschild solution that is compatible with the system, which clearly means that we have not used the so-called rotation as applicable to the Kerr metric. It is important to add here that in Subsection 7.2, “Mass and predicted radii of observed pulsars,” we present several pulsars category-wise, but those are treated under static/slow rotation effects only following Refs. [96,97,98,99,100,101,102,103] as available in the literature. While pulsars exhibit dynamic features such as magnetic fields and rapid/fast rotation, our assumption of pulsars as static or slowly rotating neutron stars is a simplifying approximation frequently employed in astrophysical models [104,105,106,107]. This approach simplifies mathematical calculations and theoretical analyses, enabling us to establish a foundational framework for our study without incorporating the complexities associated with pulsar rotation. In addition, this simplification does not alter the fundamental nature of pulsars, as the structural changes or instabilities induced by the cracking phenomenon occur on timescales significantly longer than the rotation period of pulsars, thereby justifying the consideration of rotation effects as negligible for the specific analysis and treating pulsars as static.

The outline of the present work is as follows: In Sect. 2 we review the field equations for \(f(\mathscr {T})\) gravity. The exact solutions to the Einstein field equations under \(f(\mathscr {T})\) gravity are presented in Sect. 3, whereas the boundary condition is imposed to obtain the expressions for the constants in Sect. 4. In Sect. 5 we perform a physical analysis of the \(f(\mathscr {T})\) model, with special attention to cases regarding (5.1) the physical behavior of density and pressures, and (5.2) the energy condition. In Sect. 6, the stability and equilibrium conditions of the anisotropic solution are analyzed in the following subsections: (6.1) Herrera cracking concept, (6.2) Adiabatic index, (6.3) Zel’dovich–Harrison–Novikov condition, and (6.4) stable equilibrium under the Tolman–Oppenheimer–Volkoff (TOV) equation. In Sect. 7 we exhibit the mass–radius profile for the stellar object with respect to (7.1) compactness and surface redshifts and (7.2) mass and predicted radii of stellar objects. The last section (Sect. 8) is dedicated to some concluding remarks.

2 Review of the field equations for \(f(\mathscr {T})\) gravity

The starting point is the line element of a manifold expressed as

$$\begin{aligned} ds^{2}=g_{ba }dx^{b}dx^{a }=\zeta _{kl}\theta _{b}^{k}\theta _{a }^{l}dx^{b}dx^{a}, \end{aligned}$$
(1)

with

$$\begin{aligned} dx^{a}=e_{\eta }^{a}\theta ^{\eta },~\theta ^{\eta }=e_{a}^{\eta }dx^{a}~\text {and}~\zeta _{b a}=\mathrm{{diag}}[1,-1,-1,-1], \end{aligned}$$

where the Greek indices represent the tetrad field \(\theta ^a_\eta \), and the Latin indices are associated with the spacetime coordinates. The metric determinant has a square root, i.e., \(e=\sqrt{-g}=det[e^{b}_{a}]\).

The Weitzenböck antisymmetric connections can be stated as long as the torsion is nonzero and the Riemann tensor remains zero

$$\begin{aligned} \varGamma _{ba }^{\eta }= & {} e^{\eta }_{l}\partial _{b }e^{l}_{a}. \end{aligned}$$
(2)

The torsion and con-torsion tensors are represented by the following expressions:

$$\begin{aligned} \mathscr {T}_{ab }^{l}= & {} \varGamma _{ab }^{l} - \varGamma _{b a}^{l}=e^{l}_{k}\left( \partial _{a}e^{k}_{b }-\partial _{b }e^{k}_{a}\right) ,\end{aligned}$$
(3)
$$\begin{aligned} K^{ab }_{l}= & {} -\frac{1}{2}\left( \mathscr {T}^{ab }_{l}-\mathscr {T}^{b a}_{l}-\mathscr {T}^{ab }_{l}\right) . \end{aligned}$$
(4)

The two tensors described previously, Eqs. (3) and (4), are merged to create a novel tensor as

$$\begin{aligned} S^{ab }_{l}= & {} \frac{1}{2}\left( \delta ^{a}_{l}\mathscr {T}^{n b}_{n}+K^{ab}_{l}-\mathscr {T}^{n a}_{n} \delta ^{b }_{l}\right) . \end{aligned}$$
(5)

Now, we may represent the torsion scalar as

$$\begin{aligned} \mathscr {T}= & {} \mathscr {T}_{ab }^{l} S^{ab }_{l}. \end{aligned}$$
(6)

To derive the action for modified gravity \(f(\mathscr {T})\), one may simply replace R with \(\mathscr {T}\), similarly to the revised gravitational action in connection to f(R) theory, as

$$\begin{aligned} S=\int dx^{4} e\Big [ \frac{1}{16\pi } f(\mathscr {T})+\mathscr {L}_{Matter}]. \end{aligned}$$
(7)

In the context of natural (i.e., geometrized) units, where \(G = c = 1\), the variable f denotes a function that depends on the torsion scalar \(\mathscr {T}\), whereas \(\mathscr {L}_{Matter}\) represents the Lagrangian density. For clarity, we would like to state at this beginning stage that in the present work, the two symbols are employed as follows: \(\mathscr {T}\) is the torsion, while T is the trace of the energy–momentum tensor, to overcome any confusion throughout the manuscript.

To obtain the system of equations for motion, we vary Eq. (7) with respect to the tetrad field as

$$\begin{aligned}{} & {} e_{n}^{a}S_{a}^{ib }\partial _{n}\mathscr {T}f_{\mathscr {T}\mathscr {T}}+e^{-1}\left( ee_{n}^{a}S_{a}^{ib }\right) f_{\mathscr {T}}+e_{n}^{i}\mathscr {T}_{i k}^{a}S_{a}^{b k}f_{\mathscr {T}}\nonumber \\{} & {} \quad - \frac{1}{4}e_{n}^{b }f=-4\pi e_{n}^{a} T_{a }^{b}. \end{aligned}$$
(8)

The energy–momentum tensor for the Lagrangian density \(\mathscr {L}_{matter}\) is represented by the energy–momentum tensor \(T^b_a\). Nevertheless, the following symbols are used to symbolize the derivatives of the function f: \(f_{\mathscr {T}}=\frac{\partial f}{\partial \mathscr {T}}\) and \(f_{\mathscr {T}\mathscr {T}}=\frac{\partial ^{2} f}{\partial \mathscr {T}^2}\). For an anisotropic fluid distribution, the energy–momentum tensor is defined as

$$\begin{aligned} T_{a}^{b }=(\rho +P_{t})A_{a}A^{b }-P_{t}\delta _{a}^{b }+(P_{r}-P_{t})B_{a}B^{b }, \end{aligned}$$
(9)

where the four-speed and radial four vectors are represented by \(A_{b }=e^{l}\delta _{b }^{0}\) and \(B_{b }=e^{b }\delta _{b }^{1}\), respectively. The symbols \(\rho \), \(P_{r}\) and \(P_{t}\) represent the effective energy density, the radial effective pressure, and the tangential effective pressure, respectively.

The equation of motion in \(f(\mathscr {T})\) gravity may be expressed in an alternative form using the covariant derivative formalism

$$\begin{aligned}{} & {} G_{ba }f_{\mathscr {T}}+S_{ab}^{l}\nabla _{l}\mathscr {T}f_{\mathscr {T}\mathscr {T}} +\frac{\mathscr {T}}{2}\left( \frac{f}{\mathscr {T}}-f_{\mathscr {T}}\right) g_{ba }\nonumber \\{} & {} \quad =\frac{1}{16\pi }T_{ba }, \end{aligned}$$
(10)

where the Einstein tensor is denoted as \(G_{ba}\).

Now, Eq. (8) may be restated within the framework of general relativity (GR) and f(R) field equations as follows:

$$\begin{aligned} G_{ba }=\frac{1}{16\pi f_{\mathscr {T}}}\left( T_{ba }+\mathscr {T}_{ba }^{[\mathscr {T}]}\right) , \end{aligned}$$
(11)

where torsion tensor \(\mathscr {T}_{ba }^{[\mathscr {T}]}\) includes corrections derived from the torsion scalar

$$\begin{aligned} \mathscr {T}_{ba }^{^{[\mathscr {T}]}}= & {} \frac{-1}{64\pi }\left( 4S_{ab}^{l}\nabla _{l}f_{\mathscr {T}\mathscr {T}}+\left( \mathscr {R}f_{\mathscr {T}}\right. \right. \nonumber \\{} & {} \left. \left. -S_{ab}^{l} \nabla _{l}f_{\mathscr {T}\mathscr {T}}+\mathscr {T}\right) g_{ba}\right) . \end{aligned}$$
(12)

We note that Eq. (10) clearly yields the equations of general relativity for a linear \(f(\mathscr {T})\), specifically when \(f(\mathscr {T})=\mathscr {T}\).

Now, let us direct our attention to the internal structure of the spherically symmetric static fluid distribution. The metric of this distribution is determined by the following line element:

$$\begin{aligned} \mathrm{{d}}s^2= & {} -e^{\varOmega }\mathrm{{d}}t^{2}+e^{\varPsi }\mathrm{{d}}r^{2}+r^{2} \mathrm{{d}} \theta ^{2}+r^{2}\sin ^{2} \theta ~\mathrm{{d}} \varOmega ^{2}.~~~~~~ \end{aligned}$$
(13)

The two metric potentials that are dependent only on the radial coordinate, r, are represented by the symbols \(\varOmega \) and \(\varPsi \). Additionally, we establish the energy–momentum tensor for a self-gravitating system with anisotropy in (3+1)-dimensions as follows:

$$\begin{aligned}{} & {} T_{a}^{b}=\mathrm{{diag}} \left( -\rho , ~P_{r},~P_{t},~P_{t} \right) , \end{aligned}$$
(14)

with

$$\begin{aligned}{} & {} T_{a}^{b}=0, \ \ if\ a \ne b. \end{aligned}$$
(15)

The pressure anisotropy is defined as the difference between the radial pressure \(P_{r}\) and the tangential pressure \(P_{t}\), and its value is controlled by the metric potentials \(\varOmega \) and \(\varPsi \). The tetrad matrix for the metric in Eq. (9) is given by

$$\begin{aligned} \Big [e^{b}_{a}\Big ]=\mathrm{{diag}}\Big [e^{\varOmega /2 },~e^{\varPsi /2},~r,~r\sin \theta \Big ], \end{aligned}$$
(16)

whereas the determinant of this tensor is given as

$$\begin{aligned} e=\mathrm{{det}}\Big [e^{b}_{a}\Big ]=e^{(\varOmega +\varPsi )/2}\,r^2\sin \theta . \end{aligned}$$
(17)

The torsion scalar, along with its derivative, is defined in terms of the radial coordinate r as

$$\begin{aligned}{} & {} \mathscr {T}(r)=\frac{2 e^{-\varPsi }}{r^2} \Bigg [r\,\varOmega '+1\Bigg ], \end{aligned}$$
(18)
$$\begin{aligned}{} & {} \mathscr {T}'(r)=\frac{e^{-\varPsi }}{r} \Bigg [\varOmega ''-\frac{1}{r^2}-\left( \varOmega '+\frac{1}{r}\right) \left( \varPsi '+\frac{1}{r}\right) \Bigg ],\nonumber \\ \end{aligned}$$
(19)

where the derivative with respect to the radial coordinates is shown by the prime symbol \(()'\).

By substituting the previously described tetrad field (16) and inserting the torsion scalar and its derivative into Eq. (8), one may formally derive the equations of motion for an anisotropic fluid in \(f(\mathscr {T})\) gravity as

$$\begin{aligned} 8\pi \rho= & {} f_\mathscr {T} \Big [\frac{1}{r^2}+\frac{1}{r}e^{-\varPsi } \left( \varPsi '+\varOmega '\right) -\mathscr {T}(r)\Big ]+\frac{f}{2},~~~\nonumber \\ \end{aligned}$$
(20)
$$\begin{aligned} 8\pi P_r= & {} f_\mathscr {T} \Big [-\frac{1}{r^2}+\mathscr {T}(r)\Big ]-\frac{f}{2}, \end{aligned}$$
(21)
$$\begin{aligned} 8\pi P_t= & {} f_\mathscr {T} \Big [e^{-\varPsi } \left( \left( \frac{\varOmega '}{4}+\frac{1}{2 r}\right) \left( \varOmega '-\varPsi '\right) +\frac{\varOmega ''}{2}\right) \nonumber \\ {}{} & {} + \frac{\mathscr {T}(r)}{2}\Big ]-\frac{f}{2}. \end{aligned}$$
(22)

The previously described field equations obviously result in the equivalent field equations in general relativity for \(f(\mathscr {T}) = \mathscr {T}\), as shown by Eqs. (20)–(22). In the context of \(f(\mathscr {T})\) gravity, an additional non-diagonal quantity is acquired in the following manner:

$$\begin{aligned} \frac{cot\theta }{2r^2} \mathscr {T}' f_{\mathscr {T}\mathscr {T}}=0.~ \end{aligned}$$
(23)

This is distinct from the situation of general relativity. The possibilities that arise from Eq. (23) may be categorized as follows: (a) when \(\mathscr {T}'=0\), and (b) when \(f_{\mathscr {T}\mathscr {T}}=0\). In the second case, we obtain a linear functional form of \(f(\mathscr {T})\) using the following method:

$$\begin{aligned} f(\mathscr {T})=\alpha \mathscr {T} + \gamma .~ \end{aligned}$$
(24)

The variables \(\alpha \) and \(\gamma \) represent integration constants. The aforementioned linear function has been successfully used in different situations involving \(f(\mathscr {T})\) gravity. Our objective is to find the solution to the \(f(\mathscr {T})\) gravity field equations (20)–(22) using the functional form (24). Therefore, the final form of the field Eqs. (20)–(22) under Eq. (24) becomes

$$\begin{aligned}{} & {} \rho = \frac{1}{16 \pi r^2}[2\alpha + 2e^{-\varPsi }\alpha (r\varPsi '-1)-r^2\gamma ], \end{aligned}$$
(25)
$$\begin{aligned}{} & {} P_{r}= \frac{1}{16 \pi r^2}[-2\alpha +2e^{-\varPsi }\alpha (r\varOmega '+1)+r^2\gamma ], \end{aligned}$$
(26)
$$\begin{aligned}{} & {} P_{t} = \frac{e^{-\varPsi }}{32 \pi r}[2e^{\varPsi }r\gamma +\alpha (2+r\varOmega ')(\varOmega '-\varPsi '){+}2r\alpha \varOmega ''].\nonumber \\ \end{aligned}$$
(27)

3 New exact solution in \(f(\mathscr {T})\) gravity

The \(f(\mathscr {T})\) gravity system (26)–(27) contains five unknowns, namely, \(\rho \), \(P_r\), \(P_t\), \(\varPsi \), and \(\varOmega \). We need to find the exact solution for this system by solving the pressure anisotropy equation, which can be given as

$$\begin{aligned}{} & {} \alpha \,e^{-\varPsi }\big [ (2 \varOmega ^{\prime \prime }+ \varOmega ^{\prime 2}) r^2-2 \varOmega ^{\prime } r- \varPsi ^{\prime } r ( \varOmega ^{\prime }r+2)\nonumber \\{} & {} \quad +4 (e^{\varPsi }-1)\big ] =32 \pi r^2 \varDelta .~~ \end{aligned}$$
(28)

Due to the presence of three unknowns in the pressure anisotropy Eq. (28), it is necessary to have two conditions in order to solve the differential equation. For this reason, we choose a physically viable ansatz for the potential \(\varPsi (r)\) of the form

$$\begin{aligned} \varPsi (r)=\ln \Big [\frac{1-2Nr^2}{1+Nr^2} \Big ], \end{aligned}$$
(29)

where N is a constant with dimension \(l^{-2}\).

According to the above Eq. (29), as \(r \rightarrow 0\), we find that \(e^{\varPsi } \rightarrow 1\). This means that the metric potential \(e^\varPsi \) is physically acceptable since it does not contain any singularities at the center of the physical system. Furthermore, this metric function gives a decreasing density (see upper left panel of Fig. 1).

The metric function (29) was used previously by Baskey et al. [108] in the context of GR. By plugging Eq. (29) into Eq. (28), we get

$$\begin{aligned}{} & {} \alpha \Big [2 \varOmega ^{\prime \prime } r \left( 1-2 N^2 r^4-N r^2\right) +\varOmega ^{\prime 2} \big (r-2 N^2 r^5-N r^3\big ) \nonumber \\{} & {} \qquad +\varOmega ^{\prime } \times \left( 4 N^2 r^4+8 N r^2-2\right) +24 N^2 r^3\Big ] \nonumber \\{} & {} \quad =32\pi r \varDelta \left( 1-2 N r^2\right) ^2.~~~~~~ \end{aligned}$$
(30)

The solution of the above differential equation depends on the suitable expression for the anisotropic factor \(\varDelta \), so we first choose the anisotropy factor \(\varDelta \) expression as follows:

$$\begin{aligned} \varDelta (r)=\frac{3 \alpha N^2r^2}{ 4 \pi (1-2Nr^2)^2}. \end{aligned}$$
(31)

From Eq. (31), it is evident that the value of \(\varDelta \) becomes zero at the center \(r=0\), and thereafter increases as the value of r increases. By substituting the value of \(\varDelta \) into Eq. (30), we obtain

$$\begin{aligned}{} & {} -2 \varOmega ^{\prime \prime } r \left( 2 N^2 r^4+N r^2-1\right) +\varOmega ^{\prime 2} \left( -2 N^2 r^5-N r^3+r\right) \nonumber \\{} & {} \quad +\varOmega ^{\prime } \left( 4 N^2 r^4+8 N r^2-2\right) =0. \end{aligned}$$
(32)

Now we use the transformation \(\varOmega =2\ln \Phi \) to covert the differential Eq. (32) in its simplest form as

$$\begin{aligned} \Phi ' \left( 2 N^2 r^4+4 N r^2-1\right) -\Phi '' r \left( 2 N^2 r^4{+}N r^2{-}1\right) =0.\nonumber \\ \end{aligned}$$
(33)

After solving the above differential Eq. (33), we obtain

$$\begin{aligned} \Phi (r)= & {} \frac{A}{2 N} \Bigg (\sqrt{1-N r^2-2N^2r^4}-\frac{9 \tan ^{-1}\left( \frac{\sqrt{6}-2 \sqrt{N r^2+1}}{\sqrt{2-4 N r^2}}\right) }{\left( \sqrt{6 N r^2+6}-3\right) ^2} \nonumber \\{} & {} \times \left( 2 \sqrt{2} N r^2-4 \sqrt{3 N r^2+3}+5 \sqrt{2}\right) \Bigg )+B. ~~~~~ \end{aligned}$$
(34)

The expressions for density and pressures are given as

$$\begin{aligned} 8\pi \rho&=\frac{3 \alpha N \left( 2 N r^2-3\right) }{\left( 1-2 N r^2\right) ^2}-\frac{\gamma }{2}, \end{aligned}$$
(35)
$$\begin{aligned} 8\pi P_r&=\frac{\gamma }{2}+\alpha N \left( \frac{3}{1-2 N r^2}+\frac{4 A \sqrt{N r^2+1}}{P_{r1} \sqrt{1-2 N r^2}}\right) ,~~ \end{aligned}$$
(36)
$$\begin{aligned} 8\pi P_t&= \frac{1}{2 \Phi (r) \left( 1-2 N r^2\right) ^2}\Bigg [\frac{16 \alpha A N^3 r^6}{\sqrt{1-N r^2-2N^2r^4}}+4 \gamma N^2 \nonumber \\&\quad \times r^4 \Phi (r) +\frac{4 \alpha A}{\sqrt{1-2 N r^2} \sqrt{N r^2+1}}+N \Bigg (\!-4 \gamma r^2 \Phi (r) \nonumber \\&\quad +6 \alpha \Phi (r)-\frac{12 \alpha A r^2}{\sqrt{1-2 N r^2} \sqrt{N r^2+1}}\Bigg )+\gamma \, \Phi (r)\Bigg ], \end{aligned}$$
(37)

where

$$\begin{aligned} P_{r1}= & {} A \sqrt{N r^2+1} \sqrt{1-2 N r^2}- \tan ^{-1}\left( \frac{\sqrt{6}-2 \sqrt{N r^2+1}}{\sqrt{2-4 N r^2}}\right) \\{} & {} \times 3 \sqrt{2} A+2 B N. \end{aligned}$$

4 Boundary condition

When considering the linear functional form of \(f(\mathscr {T})\) gravity theory, the exterior Schwarzschild–de Sitter solution may provide the most suitable exterior spacetime, as

$$\begin{aligned} \mathrm{{d}}s^2= & {} -\bigg (1-\frac{2{M}}{r}-{\Lambda \over 3}~r^2\bigg ) \mathrm{{d}}t^2+ \frac{\mathrm{{d}}r^2}{\bigg (1-\frac{2{M}}{r}-{\Lambda \over 3}~r^2\bigg )}\nonumber \\{} & {} + r^2 (\mathrm{{d}}\theta ^2 + \sin ^2\theta \mathrm{{d}}\phi ^2).~~ \end{aligned}$$
(38)

Let M represent the total mass of the object at the boundary \(r=R\). It is given by the relation \(M=m(R)/\alpha \). Additionally, \(\Lambda \) is equal to \(\alpha /2\gamma \). The application of the first and second fundamental forms yields the following outcome:

$$\begin{aligned}{} & {} \bigg (1-\frac{2{{M}}}{R}-{\Lambda \over 3}~R^2\bigg )=e^{\varOmega (R)},~~~ \end{aligned}$$
(39)
$$\begin{aligned}{} & {} \bigg (1-\frac{2{{M}}}{R}-{\Lambda \over 3}~R^2\bigg )=e^{-\varPsi (R)},~~~ \end{aligned}$$
(40)
$$\begin{aligned}{} & {} P_r(R)=0.~~~ \end{aligned}$$
(41)

These boundary conditions are the most appropriate for the joining of two spacetimes at the surface \(r=R\). By using Eq. (41), we determine

$$\begin{aligned} A&= \frac{2 N \sqrt{N R^2+1} \left( \sqrt{6 N R^2+6}-3\right) ^2}{\left( 1-2 N R^2\right) \left[ 2N F_1(R) \left( \sqrt{6 N R^2+6}-3\right) ^2 + F_2(R)\right] },~~~~~~~ \end{aligned}$$
(42)
$$\begin{aligned} B&= F_1(R) \frac{2 N \sqrt{N R^2+1} \left( \sqrt{6 N R^2+6}-3\right) ^2}{\left( 1-2 N R^2\right) \left[ 2N F_1(R) + F_2(R)\right] }, \end{aligned}$$
(43)
$$\begin{aligned} M&= \frac{R^3 \left( \gamma +18 \alpha N-2 \gamma N R^2\right) }{12 \alpha \left( 2 N R^2-1\right) }, \end{aligned}$$
(44)

where

$$\begin{aligned} F_1(R) =\,&\frac{-1}{2 N \sqrt{1-2 N R^2} \left( \gamma +6 \alpha N-2 \gamma N R^2\right) }\Bigg [3 \sqrt{2-4 N R^2} \nonumber \\ {}&\times \tan ^{-1}\left( \frac{\sqrt{6}-2 \sqrt{N R^2+1}}{\sqrt{2-4 N R^2}}\right) \left( -\gamma -6 \alpha N{+}2 \gamma N R^2\right) \nonumber \\&-\sqrt{N R^2+1} \left( 2 N R^2-1\right) \left( \gamma +14 \alpha N-2 \gamma N R^2\right) \Bigg ], \end{aligned}$$
(45)
$$\begin{aligned} F_2(R) =\,&\sqrt{N R^2+1} \sqrt{1-2 N R^2} \left( \sqrt{6 N R^2+6}-3\right) ^2 \nonumber \\ {}&-9 \left( 2 \sqrt{2} N R^2-4 \sqrt{3 N R^2+3}+5 \sqrt{2}\right) \nonumber \\ {}&\times \tan ^{-1}\left( \frac{\sqrt{6}-2 \sqrt{N R^2+1}}{\sqrt{2-4 N R^2}}\right) . \end{aligned}$$
(46)

5 Physical analysis of the \(f(\mathscr {T})\) model

5.1 Physical behavior of density and pressures

For the stability requirement of a model, the density \(\rho \), radial pressure \(P_r\), and transverse pressure \(P_t\) should all be positive inside the physical configuration and should decrease outward monotonically. We note that Fig. 1 supports the positive and monotonically decreasing behavior of the model variables. One interesting point here is that Fig. 1 shows that the transverse force is always higher than the radial force throughout the internal structure. It readily implies the repulsive nature of the anisotropic force, which in turn indicates that the model is highly stable due to the repulsive force.

Another intricate feature is specifically revealed from the transverse pressure profile of Fig. 1,in that, unlike the radial pressure, it does not vanish on the surface of the spherical object. This feature indicates the existence of an ergo-sphere, and hence there is an appearance of the bulging in the equatorial region which is expected due to the pressure anisotropy. In other words, this effect is suggestive of a hypersurface such that the observer can look at the event away from the bounding surface of the physical configuration.

On the other hand, we calculate the Zel’dovich condition, which can be defined by a pressure–density ratio as

$$\begin{aligned}{} & {} \varPsi _i(r) = \frac{P_{i}(r)}{\rho (r)}. \end{aligned}$$
(47)

In the above expression, the index \(i = \{r, t\}\) denotes the radial and tangential components. According to the Zel’dovich criterion, the energy density must dominate over the pressure throughout the stellar configuration for a physically viable model, i.e., \(\varPsi _i(r)\) must fall between 0 and 1. One can note from Fig. 2 that the Zel’dovich criterion is confirmed.

Fig. 1
figure 1

The behavior of the density (\(\rho \)), radial pressure (\(P_{r}\)), tangential pressures (\(P_t\)), and anisotropy (\(\varDelta =P_{t}-P_{r}\)) against the radial coordinates r for the values of free parameters \(N=-0.0031~\text {km}^{-2}\) and \(\gamma =0.0002\)

Fig. 2
figure 2

The behavior of the pressure–density ratios (\(P_r/\rho \)) & (\(P_t/\rho \)) against the radial coordinates r for the values of free parameters \(N=-0.0031~\text {km}^{-2}\), \(R=11.6~\text {km}\). and \(\gamma =0.0002\)

Fig. 3
figure 3

The behavior of energy conditions (\(\rho -P_r\)) and (\(\rho -P_t\)) for similar values as used in Fig. 2

5.2 Energy condition

In the context of \(f(\mathscr {T})\) gravity, energy conditions may be described as local inequalities that establish a relationship between energy density \(\rho \) and pressures (\(P_r\), \(P_t\)) under certain restrictions. In order for a structure to be physically viable, it must meet certain energy parameters throughout the interior of the star. The calculation of energy conditions centers primarily on the null energy condition (NEC), weak energy condition (WEC), strong energy condition (SEC), dominant energy condition (DEC), and trace energy condition (TEC). These conditions are described as follows:

$$\begin{aligned}{} & {} \mathrm{{NEC}}: \rho (r) + P_r(r) \ge 0, ~~ \rho (r) + P_t(r) \ge 0, \nonumber \\{} & {} \mathrm{{WEC}}: \rho (r) \ge 0,~~ \rho (r) + P_r (r) \ge 0,~~ \rho (r) + P_t (r) \ge 0, \nonumber \\{} & {} \mathrm{{DEC}}: \rho (r) -|P_r(r)| \ge 0,~~ \rho (r) - |P_t(r)| \ge 0, \nonumber \\{} & {} \mathrm{{SEC}}: \rho (r) + P_r(r) + 2 P_t(r) \ge 0, \nonumber \\{} & {} \mathrm{{TEC}}: \rho (r) - P_r(r) - 2 P_t(r) \ge 0. \end{aligned}$$
(48)

Because of the density and pressures that are positive, NEC and WEC must be fulfilled. In Figs. 3 and  4, we have visually shown the DEC, SEC, and TEC. We have determined that the proposed solutions satisfy these energy criteria concurrently.

Fig. 4
figure 4

The behavior of energy condition (\(\rho -P_r-2P_t\)) for similar values as used in Fig. 3

6 Analysis of the stability and equilibrium conditions of the anisotropic solution

6.1 Herrera cracking concept

One essential test in investigating the instability of anisotropic stellar configurations is to examine whether the model encounters overturning or cracking. The fundamental concept is that on either side of the fracture point, the fluid constituents undergo acceleration relative to one another. The phenomenon of cracking with a self-gravitating anisotropic compact star configuration was first investigated by Herrera [111]. The presence of cracking indicates that in order for a star model to be considered valid, the radial sound speed must adhere to the causality criterion, which states that \(v^2_r\) & \(v^2_t\) must be less than or equal to 1 (assuming \(c = 1\) and \(v^2_i=\frac{\mathrm{{d}}P_i}{\mathrm{{d}}\rho }\)). Le Chatelier’s principle implies that the speed of sounds, denoted as \(v_r\) and \(v_t\), is expected to have a positive value, i.e., in an alternative form \(v^2_i=\frac{\mathrm{{d}}P_i}{\mathrm{{d}}\rho }\ge 0\) [112, 113].

Fig. 5
figure 5

The behavior of the radial and tangential velocities (\(v^2_r\)) & (\(v^2_t\)) against the radial coordinates r for the values of free parameters \(N=-0.0031~\text {km}^{-2}\) and \(\gamma =0.0002\)

Hence, the expression for the radial sound speed is now provided as

$$\begin{aligned} v^2_r =&\Bigg [\!\left( 2 N r^2-1\right) ^3 \Bigg (\!-12 \frac{B^2}{A^2} N^2 \left( \sqrt{6} N r^2-3 \sqrt{N r^2+1}{+}\sqrt{6}\right) \nonumber \\&-6 \frac{B}{A} N \sqrt{1-2 N r^2} \left( 2 N r^2+3\right) \left( \sqrt{6 N r^2+6}-3\right) \nonumber \\&-9 \Big (\sqrt{1-2 N r^2} \left( 2 N r^2+3\right) \left( 3 \sqrt{2}-2 \sqrt{3 N r^2+3}\right) \nonumber \\&-4 \frac{B}{A} N \left( 2 \sqrt{3} N r^2-3 \sqrt{2 N r^2+2}+2 \sqrt{3}\right) \Big )\nonumber \\&\times \tan ^{-1}\left( \frac{\sqrt{6}-2 \sqrt{N r^2+1}}{\sqrt{2-4 N r^2}}\right) +v_1(r)\Bigg )\Bigg ]\Bigg /v_2(r),~~~~~~~ \end{aligned}$$
(49)
$$\begin{aligned} v^2_t =&\bigg [24\frac{B^2}{A^2} N^2 \Big (4 \sqrt{6} N^3 r^6+12 N^2 r^4 \left( 6 \sqrt{6}-5 \sqrt{N r^2+1}\right) \nonumber \\&+3 N r^2 \left( 59 \sqrt{6}-100 \sqrt{N r^2+1}\right) -267 \sqrt{N r^2+1}\nonumber \\&+109 \sqrt{6}\Big )+\varPsi _{d1}(r) +\left( 16 N^3 r^6-24 N^2 r^4-6 N r^2+7\right) \nonumber \\&\times \bigg (4 \sqrt{6} N^3 r^6+12 N^2 r^4 \big (6 \sqrt{6}-5 \sqrt{N r^2+1}\big )+3 N r^2 \nonumber \\&\times \left( 59 \sqrt{6}-100 \sqrt{N r^2+1}\right) -267 \sqrt{N r^2+1} +109 \sqrt{6}\bigg )\bigg ]\nonumber \\&\bigg /\bigg [3 \varPsi _{d2}(r) \sqrt{N r^2+1} \left( 2 N r^2-5\right) \left( \sqrt{6 N r^2+6}-3\right) \bigg ],~~~~~~~ \end{aligned}$$
(50)

where \(v_1(r)\) and \(v_2(r)\) are given in the appendix.

Fig. 6
figure 6

The stability factor (\(v^2_t-v^2_r\)) against the radial coordinates r for the values of free parameters \(N=-0.0031~\text {km}^{-2}\) and \(\gamma =0.0002\)

The verification of the causality criterion for our model is shown in Fig. 5. We note that to assess Herrera’s cracking concept on the stability of compact objects, Abreu et al. [114] introduced a range to identify possibly stable or unstable anisotropic compact structures. According to their research, a model may be considered theoretically stable if it satisfies the inequality \(-1\le v^2_t-v^2_r < 0 \), as long as there is no change in sign of \(v^2_t-v^2_r\) inside the radius of the star. Given that the condition \(-1\le v^2_t-v^2_r < 0 \) is satisfied by our model, as seen in Fig. 6, we can infer that the model satisfies Herrera’s cracking idea.

6.2 Adiabatic index

The stability of an object may also be evaluated using the adiabatic index as a simple test. The adiabatic index for a given energy density may be used to characterize the nature of the equation of state. Thus, the adiabatic index determines the stability of both non-relativistic and relativistic compact objects. The adiabatic index for relativistic anisotropic structures can be defined as the ratio of two specific temperatures:

$$\begin{aligned} \varGamma =\frac{P_r+\rho }{P_r} v^2_r. \end{aligned}$$
(51)

Bondi [115] proposed that the stability criteria for a star model to be stable should be \(\varGamma > 4/3\) for the Newtonian sphere and \(\varGamma =4/3\) for neutral equilibrium. Heintzmann and Hillebrandt [117] determined that the adiabatic index needed for a stellar system to be in equilibrium was \(\varGamma > 4/3\) by taking into account that the matter is anisotropic. Subsequently, Chan et al. [116] made some modifications for the relativistic fluid situation, which are stated as

$$\begin{aligned} \varGamma < \frac{4}{3}\left( 1 + \frac{\varDelta }{r|(P_{r})|^{\prime }}+\frac{1}{4}\frac{\rho P_{r}r}{|(P_{r})|^{\prime }} \right) . \end{aligned}$$
(52)

Here, anisotropy is represented by the first component on the right side of Eq. (52), and the relativistic corrections to the Newtonian ideal fluid are represented by the second term. We have presented only the values of \(\varGamma \) in the radial direction, which consistently exceed 4/3 across the star model (Fig. 7).

Fig. 7
figure 7

The behavior of the adiabatic index (\(\varGamma \)) against the radial coordinates r for the values of free parameters \(N=-0.0031~\text {km}^{-2}\) and \(\gamma =0.0002\)

Fig. 8
figure 8

The stability analysis of the model via \(M-\rho _0\) and \(dM/d\rho _0-\rho _0\) curves for similar values as used in Fig. 5

6.3 Zel’dovich–Harrison–Novikov condition

A compact structure is deemed stable when the mass of the configuration increases as the core density increases. Mathematically, every stable structure must satisfy the condition \(\frac{dM{\rho _0}}{d\rho _0} >0\). The stability requirement is referred to as the Zel’dovich–Harrison–Novikov condition [118, 119]. While this condition is essential, it is not sufficient. For our solution, the central density

$$\begin{aligned}{} & {} 8 \pi \rho _0= -9 \alpha -\frac{\gamma }{2}, \end{aligned}$$
(53)
$$\begin{aligned}{} & {} M (\rho _0)=\frac{R^3 \left( 16 \pi \rho _0 \left( 9 \alpha -\gamma R^2\right) -\gamma ^2 R^2\right) }{12 \alpha \left( 9 \alpha +16 \pi \rho _0 R^2+\gamma R^2\right) }, \end{aligned}$$
(54)
$$\begin{aligned}{} & {} \frac{dM}{d \rho _0} = \frac{108 \pi \alpha R^3}{\left( 9 \alpha +16 \pi \rho _0 R^2+\gamma R^2\right) ^2}. \end{aligned}$$
(55)

Figure 8 shows that the derivative of M with respect to \(\rho _0\) exhibits a positive value, i.e., the mass increases with central density \(\rho _0\). This observation suggests that the anisotropic models developed possess stability.

Fig. 9
figure 9

The behavior of different forces against the radial coordinates r for the values of free parameters \(N=-0.0031~\text {km}^{-2}\) and \(\gamma =0.0002\) with different values of \(\alpha \). Top left panel for \(\alpha =0.8\), top right panel for \(\alpha =1.0\), Bottom left panel for \(\alpha =1.2\), and bottom right panel for \(\alpha =1.4\)

6.4 Stable equilibrium under the TOV equation

The hydrostatic equilibrium of a star is examined using the Tolman–Oppenheimer–Volkoff equation [120, 121], commonly referred to as the the TOV equation, which stipulates that for a model to be considered viable, it must exhibit stable equilibrium against three distinct forces: gravitational force, hydrostatic force, and anisotropic force. Mathematically, the sum of these forces must remain zero across the whole star. The TOV equation describes the internal composition of a compact star object with spherical symmetry. In the context of anisotropy, it is expressed as

$$\begin{aligned} -\frac{\varOmega '}{2}(\rho +P_r)-\frac{\mathrm{{d}}P_r}{\mathrm{{d}}r}+\frac{2(P_t-P_r)}{r}=0. \end{aligned}$$
(56)

Alternatively, Eq. (56) may be expressed as follows:

$$\begin{aligned} F_g + F_h + F_a = 0, \end{aligned}$$
(57)

where \(F_g\) represents the gravitational force, and \(F_h\) and \(F_a\) represent the hydrostatic force and anisotropic force, respectively, which can be written as

$$\begin{aligned} F_g= -\frac{\varOmega '}{2}(\rho +P_r),~~~F_h=-\frac{\mathrm{{d}}P_r}{\mathrm{{d}}r},~~F_a=\frac{2(P_t-P_r)}{r}.\nonumber \\ \end{aligned}$$
(58)

Figure 9 illustrates the evolution of different forces with respect to the radial coordinate. It is evident that the gravitational force is dominant and negative in nature. This force is counterbalanced by the combined influence of hydrostatic forces and anisotropic forces to maintain equilibrium within the system.

7 Mass–radius profile for the self-bound pulsar objects

7.1 Compactness and surface redshifts

The non-collapsing nature of a stellar object is essentially determined by its mass and radius relation, which is known as the compactness factor (\(u=m/r\)). The compactness factor (u) for a non-collapsing star must be less than 8/9 for the isotropic fluid system in standard GR. Furthermore, Andreasson–Böhmer [122] derived the upper bound of the mass–radius limit in the presence of a positive cosmological constant value

$$\begin{aligned} \frac{M}{R} < \frac{2}{9}-\frac{\Lambda R^2}{3}+\frac{2}{9} \sqrt{1+3\Lambda R^2}. \end{aligned}$$
(59)

Obviously, the inequality (59) reduces to the Buchdahl limit when \(\Lambda =0\). However, in the present study, \(\Lambda =\frac{\gamma }{2\alpha }\); then the final form of inequality (59) reduces to

$$\begin{aligned} \frac{M}{R} < \frac{2}{9}-\frac{\gamma \, R^2}{6\alpha }+\frac{2}{9} \sqrt{1+\frac{3 \gamma \, R^2}{2 \alpha }}. \end{aligned}$$
(60)

Furthermore, the effective mass in \(f(\mathscr {T})\) gravity can be calculated by the formula

$$\begin{aligned} {M}_{\text {eff}}=\frac{1}{2 \alpha }\int _{0}^{R}\left( {\rho }+\frac{\gamma }{2}\right) r^{2}\mathrm{{d}}r =\frac{R}{2}\left[ 1-e^{-\lambda (R)}\right] .~~ \end{aligned}$$
(61)

Then the gravitational surface redshift can be calculated by the formula

$$\begin{aligned} z_s= & {} e^{-{\varOmega (R)}/{2}}-1 =(1-2u)^{-1/2}-1,~\text {where,}~u=\frac{M_{\text {eff}}}{R}.\nonumber \\ \end{aligned}$$
(62)

The upper bound of the mass–radius relation of the observed compact objects can be visualized from Fig. 10, which shows that the compactness relation is satisfied. However, the surface redshift is obtained using the formula (62), and its value is \(z_s=0.773978\) for all \(\alpha \) and \(\gamma \). This obtained value follows the upper bound given by Ivanov [124] and Böhmer–Harko [123].

Fig. 10
figure 10

The mass profile and predicted radii via the M–R diagram for \(N=-0.0031~\text {km}^{-2}\) and \(\gamma =0.0002\) with surface density \(2.7\times 10^{14} gm/cc\) (left panel) and surface density \(4.8\times 10^{14} gm/cc\) (right panel)

Table 1 M–R curve and prediction of radii for different values of \(\alpha \) with surface density of \(2.7\times 10^{14}\) g/cc
Table 2 M–R curve and prediction of radii for different values of \(\alpha \) with surface density of \(4.8\times 10^{14}g/cc\)

7.2 Mass and predicted radii of observed pulsars

The mass–radius relationship, which is essential to the current model’s physical validity, is examined in this section. The behavior of the M–R curves for different values of \(\alpha \) corresponding to two different surface densities, \(\rho _s=2.7\times 10^{14}\) gm/cm\(^{3}\) and \(\rho _s=4.8\times 10^{14}\) gm/cm\(^{3}\), are shown in Fig. 10. These plots show three stellar candidates whose determined masses are known. We also use the M–R curves to calculate the radii of those known stars. Based on the chosen parameters \(\{N, ~\gamma , ~R\}\), the expected radii are provided in Tables 1 and 2. Regarding the increasing values of \(\alpha \), the tendency indicates an increasing tendency in the variation of maximum mass and its associated radius. As a result, the increasing maximum measured masses for various stars are linked to the increase in the torsion parameter \(\alpha \) in the \(f(\mathscr {T})\) function, demonstrating a direct effect on the maximum mass. Tables 1 and 2 also show that when surface densities increase, a significant decrease is seen in both maximum mass and radius, while maintaining constant values for all other parameters. On the other hand, changes in surface densities, with all other parameters held constant, result in only small adjustments to the M/R compactification factor, which remains under the Anderson–Böhmer limit [122].

Furthermore, to ensure the physical validity of our model, we arbitrarily consider observational data for three observed pulsar candidates (namely, PSR J1614-2230, PSR J0952-0607, and GW190814). The numerical values of the predicted radius of stellar candidates for these compact stars are as follows:

  • Lower mass category: For PSR J1614-2230 (\(1.97M_\odot \)) \(11.87^{+0.02}_{-0.01}\) for \(\alpha =0.45\); \(12.62^{+0.01}_{-0.01}\) for \(\alpha =0.50\); \(13.25^{+0.01}_{-0.01}\) for \(\alpha =0.55\); \(12.01^{+0.01}_{-0.12}\) for \(\alpha =0.80\); \(12.83^{+0.01}_{-0.01}\) for \(\alpha =0.90\); \(13.53^{+0.01}_{-0.01}\) for \(\alpha =1.00\).

  • Intermediate mass category: For PSR J0952-0607 (\(2.35M_\odot \)) \(11.28^{+0.44}_{-}\) for \(\alpha =0.45\); \(12.53^{+0.06}_{-0.12}\) for \(\alpha =0.50\); \(13.26^{+0.01}_{-0.02}\) for \(\alpha =0.55\); \(11.53^{+0.34}_{-}\) for \(\alpha =0.80\); \(12.75^{+0.06}_{-0.08}\) for \(\alpha =0.90\); \(13.54^{+0.01}_{-0.02}\) for \(\alpha =1.00\).

  • Higher mass category: For GW190814 (\(2.5-2.67M_\odot \)) \(12.37^{+0.07}_{-0.14}\) for \(\alpha =0.50\); \(13.22^{+0.02}_{-0.03}\) for \(\alpha =0.55\); \(12.62^{+0.05}_{-0.12}\) for \(\alpha =0.90\); \(13.52^{+0.01}_{-0.03}\) for \(\alpha =1.00\).

In this connection it is worth mentioning that Astashenok et al. [109] conducted a theoretical analysis suggesting extended gravity theories to account for the high mass (2.67\(M_{\odot }\)) of a dense star seen during the compact binary merger event GW190814 detected using gravitational waves. Nashed and Capozziello [110] discovered that involving anisotropy and charge within teleparallel gravity leads to a higher mass, which was calculated from the M–R relation. The results indicate that the maximum mass is \(2.78 M_{\odot }\) for the neutral scenario and \(3 M_{\odot }\) for the charged scenario. In the present case, we also observed the maximum mass of the star beyond the \(3M_{\odot }\) when the surface density was on the of order \(10^{14}\)gm/cm\(^3\) for the higher torsion parameter. This implies that an anisotropic solution in teleparallel gravity is more suitable for modeling of a massive compact object in lower \(mass-gap\). It is interesting to note that Bhar et al. [125] discussed the \(mass-gap\) concept while constraining physical parameters for maximum allowable mass under the framework of f(Q) gravity theory.

8 Conclusion

In the present work, we propose a unique solution set for compact stars under \(f(\mathscr {T})\) gravity where we put observational constraints on the model parameters. The outcome of the investigation is profound in the sense that we note several interesting features of the compact stars which are not only physically acceptable but also observationally indicative based on the connected data range as can be observed in the data tables and graphical plots. All these attributes are successfully passed through several physically stringent tests, including (i) analysis of the \(f(\mathscr {T})\) model (via physical behavior of density and pressures, and energy condition), (ii) analysis of the stability and equilibrium conditions of the anisotropic solution (via the Herrera cracking concept, adiabatic index, Zel’dovich–Harrison–Novikov condition, stable equilibrium under three forces), and (iii) mass–radius profile for the stellar object (via compactness and surface redshifts, mass and predicted radii of stellar objects). We have exhibited via all the graphical plots (Figs. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) the expected behavior of the model parameters which are interesting and physically viable.

A few salient features in connection to the internal and external profiles of the compact stars under consideration can be put forward as follows:

\(\bullet \) Compact binary merger event GW190814: In the present study, we observe the maximum mass of the star beyond the \(3M_{\odot }\) when the surface density is on the order of \(10^{14}\)gm/cm\(^3\) for the higher torsion parameter, which implies that the anisotropic solution in teleparallel gravity is more suitable for modeling of massive compact objects in lower \(mass-gap\).

\(\bullet \) We have demonstrated the internal structure of the compact stars in connection to the recent studies on the X-ray pulsars PSR J1614-2230, PSR J0952-0607, and GW190814. In our work, the M–R graphs (Fig. 10) demonstrate high sensitivity to stiffness, and thus the proposed model provides a satisfactory physical scenario with respect to the observational signature is concerned.

As a final comment, even after performing the aforementioned thorough investigation which reveals interesting features under \(f(\mathscr {T})\) gravity due to an extensive comparative study, we feel an extreme need for data analysis. The data which are nowadays available in copious amounts due to several space-based and ground-based telescopes can provide more delicate limits on the physical parameters involved in the model. Therefore, a future project can be taken into account to consider a data analytic procedure as a confirmatory platform of the presented model. Moreover, one can consider the tidal effect due to anisotropy involved in the physical system, slow rotation effect, and moment of inertia of the compact stars. Regarding computing the moment of inertia to obtain a holistic sense of physical viability in connection to the slow rotation of the compact stars, the following works may be worth mentioning [126,127,128,129,130].