Introduction

The use of solar cells has grown dramatically in response to the growing demand for clean, renewable energy. The increasing demand for clean and renewable energy sources has focused much emphasis on the development of innovative nanomaterials for efficient solar cells1,2,3,4,5,6. Selective etching (extraction) of metals from carbides, including MAX phases, produced a multitude of these nanomaterials, including carbon nanotubes, graphene, carbide-derived carbons, and silicon carbide (SiC) nanoplatelets. Over 3000 papers have been written on the topic of MXenes by scientists worldwide in the ten years since its discovery. The Gogotsi group originally reported on MXenes as a family of important two-dimensional materials, layered carbides, and transition metal nitrides in 20117. A solar cell is a device that uses the photovoltaic effect to directly convert light energy into electric energy. Interest in the application of two-dimensional MXene materials in photovoltaics has grown since the first study was conducted in 2018. Two-dimensional materials MXene exhibits potential in a variety of applications with its distinct characteristics. Recently, 2D transition metal have emerged as promising candidates for employment in Photovoltaic Solar Cells and supercapacitor applications8,9,10,11,12. The development of innovative materials for efficient solar cells has received a lot of interest due to the growing demand for clean and renewable energy resources. Morphology, conductivity, transparency, and termination groups are among the characteristics of MXenes7. In the last 6 years, there have been several studies in the literature that have used MXene materials in perovskite solar cells. The main aim of these studies is to enhance the performance of perovskite solar cells by incorporating MXene materials into the cell structure13,14,15,16,17,18. The goal of this research is to increase the photovoltaic performance of MXene/CoS-SnO2 nanocomposite/perovskite solar cell devices by giving them increased electrical conductivity and catalytic activity through the combination of high conductive MXene and high catalytic CoS catalyst.

Methodology

The novel nanocomposite has been developed for use in the perovskite solar cells device, characterizations of the nanocomposite-electron transport layer (ETL) solution that can play an essential role in perovskite solar cells as shown in Fig. 1, fabrication of the novel perovskite solar cell device that can use for light-harvesting for sustainable development.

Figure 1
figure 1

(a) Schematic of the PSCs structure and (b) perovskite solar cell device used in this study.

Materials

Ti3AlC2 powders (≤ 40 μm) was purchased from Y-CARBON, ltd., Kiev, Ukraine. ammonium hydrogen difluoride (NH4HF2; reagent grade 95%, Sigma Aldrich), sodium hydroxide (97% purity, pellets, Sigma Aldrich). Additionally, VWR Chemicals' 99.95% pure ethanol was used. Cetyltrimethylammonium bromide (CTAB) and all other Cobalt(II) Nitrate Hexahydrate (CoNO3⋅6H2O), Ammonium thiocyanate (CH4N2S), tin (iv) oxide-15% in H2O colloidal dispersion, PbI2 lead iodide, DMF dimethyl formamide, DMSO dimethyl sulfoxide, methylammonium bromide (MABr), Formamidinium iodide (FAI), methylammonium chloride (MACl), Spiro-OMeTAD, lithium bis[(trifluoromethyl)sulfonyl]imide salt (Li-TFSI, 99%), chlorobenzene (99%), acetonitrile (99.8%), 4-tert-Butylpyridine (TBP, 96%), and Indium tin oxide (coated glass slide) were bought from Sigma Aldrich/USA reagent and used without further purification.

Fabrication of MXene/CoS heterostructure nanocomposite

We synthesized MXene/CoS heterostructure composites using the hydrothermal method, which are materials that consist of a layer of MXene combined with a layer of cobalt disulfide (CoS). MXene/CoS heterostructure nanocomposite was synthesized as shown in Fig. 2a, which are materials that consist of a layer of MXene (a type of two-dimensional transition metal carbide) combined with a layer of cobalt sulfide. MXene/CoS heterostructure composites (The combination of multiple heterojunctions together in a device) were synthesized using a simple and effective hydrothermal method. In the initial step, a mixture comprising 233 mg of CoNO3⋅6H2O and 122 mg of CH4N2S was introduced into 20 mL of absolute ethanol, followed by stirring for a duration of 30 min. Concurrently, a Ti3C2Tx colloidal suspension with a concentration of 0.4 mg mL−1 and containing 2 wt.% CTAB (Cetyltrimethylammonium bromide) was prepared., amounting to 5 mL. Then, the Ti3C2Tx MXene colloidal suspension (a mixture having particles of one component, with diameters between 10−7 and 10−9 (3.54 and 6.69 nm) meters, suspended in a continuous phase of another component) was slowly added into the above solution under magnetic stirring. The solution mixture was transferred into a Teflon-lined stainless steel autoclave, which had a capacity of 50 mL. Subsequently, the autoclave was positioned in a furnace and maintained at a constant temperature of 180 °C for a duration of 12 h. Following this, the Teflon-lined stainless-steel autoclave was left to cool down naturally to room temperature. Finally, the resulting MXene/CoS composite was obtained by subjecting it to centrifugation, followed by repetitive washing with Deionized water (DI water) and ethanol. The composite was then dried under vacuum at a temperature of 60 °C overnight. It is important to carefully follow the instructions of any synthesis method to ensure the production of high-quality MXene/CoS heterostructure composites19,20.

Figure 2
figure 2

The optical photographs of the (a) MXene/CoS mixed solution with the different concentrations (mg/mL) and (b) MXene, CoS, nanocomposite/SnO2 (ETL).

For comparison purposes, pure CoS nanoparticles were also synthesized using similar steps described above, but without the presence of MXene solution. Furthermore, to achieve MXene/CoS composites with varying MXene content, high MXene content (sample Ti3C2Tx-H/CoS) and low MXene content (sample Ti3C2Tx-L/CoS) were prepared. This was accomplished by utilizing 2 mL and 7 mL of Ti3C2Tx colloidal suspension (0.4 mg mL−1) with 2 wt.% CTAB, respectively, the subsequent steps were carried out following the aforementioned procedures. Prior to usage, all solutions were filtered through a PTFE filter with a pore size of 0.2 μm. Figure 3 provides a visual representation of these processes.

Figure 3
figure 3

The process of forming MXene/CoS heterostructure composites is depicted in the schematic diagram.

Preparation of the MXene/CoS heterostructure nanocomposite- SnO2 solution

The MXene/CoS heterostructure nanocomposite-SnO2 precursor solutions were prepared by mixing the diluted SnO2 solution with the powders of MXene/CoS heterostructure nanocomposite, followed by vigorous sonication for hours. The MXene/CoS heterostructure nanocomposite was weighed and dissolved in the SnO2 solution and maintained the concentration at 2 mg ml−1. The solvent was carefully added to the container with simultaneous continuous stirring to guarantee the thorough dissolution of the powders. Once the powders were entirely dissolved, resulting in a uniform solution, filtration was performed to eliminate any residual undissolved particles. Subsequently, the solution was carefully stored within a sealed container, maintaining it at the designated temperature, in anticipation of its forthcoming application. The preparation process of the electron transport layer (ETL) material, specifically the nanocomposite-SnO2 mixed solution, is intricately provided for a comprehensive understanding the optical photographs of the MXene/CoS mixed solution with the different concentrations. Figure 2a displays optical photographs of the Ti3C2Tx/CoS nanocomposite-SnO2 mixed solution with varying concentrations (0,1,2, & 3 mg/mL). As the concentration of MXenes increases, the transparency of the mixed solution gradually decreases. Remarkably, as the concentration of MXene is progressively increased, a conspicuous reduction in the transparency of the mixed solution becomes evident, emphasizing the significant impact of MXene content on the optical properties. Furthermore, in Fig. 2b, a series of optical photographs exhibit nanocomposite/SnO2, CoS, MXene at varying samples.

Preparation of the perovskite precursor solution

The preparation of a perovskite precursor solution involves combining the desired inorganic salt precursors in a solvent to achieve a uniform solution21. The perovskite layer was fabricated using a conventional two-step sequential deposition method22,23. Briefly, the PbI2 precursor solution was prepared by mixing PbI2 (600 mg) with DMF (0.95 mL) and DMSO (50 μL) at 60 °C for 4 h. After filtering, the perovskite solution was obtained. Next, a mixed solution containing 10 vol% TBP was stirred vigorously for at least one hour to ensure homogeneity. Subsequently, the coated layer was annealed at 150 °C for 15 min.

Fabrication of the perovskite solar cells device

The ITO glasses were subjected to repeated washing steps in an ultrasonic bath containing detergent (Diluting 30 ml of Hellmanex III concentrate solution to 2% concentration will yield 1.5 L of cleaning solution), deionized water, acetone, and isopropanol solution. Afterward, they were dried using an N2 gun. The dried ITO glass was then treated in a UV ozone chamber for a duration of 30 min. Subsequently, the MXene/CoS heterostructure nanocomposite-SnO2 solution was separately spin-coated on the ITO substrates for 40 s at 3000 rpm. The ITO glasses, now coated with an electron transfer layer (the average thickness is ~ 50 nm), were placed on a hot plate, maintaining a constant temperature of 150 °C for 15 min, followed by natural cooling to room temperature. Next, The PbI2 precursor was then spin-coated onto the ETL at 1500 rpm for 30 s and annealed at 70 °C for 1 min. Afterward, a solution containing FAI, MACl, and MABr precursors (60 mg of FAI, 6 mg of MACl, and 6 mg of MABr dissolved in 1 mL of IPA) was applied using spin-coating onto the PbI2 layer at 1300 rpm for 30 s. During the last 10 s of the spin-coating process, the antisolvent chlorobenzene (CB) solution was applied. After applying the electron transfer layer and perovskite layer (275–325 nm) onto the ITO substrates, they were returned to the hot plate and maintained at a constant temperature of 150 °C for a duration of 15 min. Subsequently, the substrates were left to gradually cool down to room temperature. Once cooled, the Spiro-OMeTAD, which was dissolved in a CB solution, was employed for spin-coating onto the perovskite layer. The HTL (the average thickness is ~ 250 nm) was prepared by spin-coating a mixture solution containing 23 μL of Li-TFSI solution (520 mg of Li-TSFI in 1 mL of acetonitrile), 36 μL of TBP, 90 mg of spiro-OMeTAD, and 1 mL of CB at 3000 rpm for 30 s. Subsequently, the devices were placed in a clean box under at 25 °C for 24 h to oxidize the surfaces. Finally, the unfinished installation was transferred into an airtight environment for the deposition of a 100 nm layer of silver (Ag) via thermal evaporation at a base pressure of 4.0 × 10−4 Pa, serving as the back contact electrode. The active area of the devices was maintained at 0.07 cm224,25.

Results and discussion

This research focuses on the photovoltaic performance of a novel category of nanocomposites infused with MXene nanoparticles in three different concentrations, as well as their preparation, characterization, configurations, materials, and fabrication methods. Therefore, the remarkable features of these nanocomposites, characterized by their high electrical conductivity, tunable band gaps, enhanced electronic conductivity, excellent chemical stability, and the ability to accommodate ion intercalation, establish them as an exceedingly promising choice for a myriad of applications.

The results are presented all the Compounds and perovskite solar cell devices were characterised by HRTEM, SEM, EDX, CV, EIS, XRD, UV–Vis, and solar simulator to examine their structural, physical, and optical properties.

Structural & morphology characterization

With the structural characterization, SEM and XRD analyses were conducted, to verify the structure of the synthesized Ti3C2Tx /CoS, CoS, and Ti3C2Tx. These observations suggest that the Ti3C2Tx /CoS, Ti3C2Tx, and CoS samples have undergone satisfactory crystallization during synthesis, thereby confirming their crystalline structures. The FESEM images shows that tiny spherical CoS nanoparticles are evenly spread over the Ti3C2Tx flakes with a diameter range of 3.54–6.69 nm. The SEM images indicate a structure of Ti3C2Tx, which enables the formation of effective sites, leading to uniform deposition of CoS nanoparticles on the conductive MXene sheets. The SEM images also show the MXene/CoS composite, revealing the uniform attachment of CoS nanoparticles to the Ti3C2Tx layers. Based on the morphological characterization, it's clear that MXene has distinct and well-defined lattice fringes with a lattice spacing of 4.22 nm. The morphology is thin and electron-transparent, which suggests a single-layer structure. The combination of layered MXene with small CoS nanoparticles (3.54–6.69 nm) provides numerous catalytic active sites. Moreover, the improved mesoporous morphology of the Ti3C2Tx /CoS composite allows for a high specific surface area and facilitates rapid electron transfer channels. Therefore, the Ti3C2Tx /CoS nanocomposite has the potential to be an excellent material that can enhance the photovoltaic performance of the electron transport layer (ETL). Elemental map imaging and spatial distribution of all elements were confirmed using energy dispersive X-ray spectroscopy (EDX) with an Oxford Instrument, for details see supplementary information.

Ultraviolet–visible absorption spectrum characterization

The photocatalytic activity can be measured by monitoring the reaction rate using techniques such as Ultraviolet–visible (UV–Vis) spectroscopy. One important use of phase change materials is the transformation of abundant solar energy into useful energy. It enables the possibility of storing energy during sunlight exposure and utilizing it during the night. This energy storage method, known as adsorptive energy storage, can be evaluated by employing UV–Vis spectrometry at various wavelengths.

To overcome this challenge and enhance the photoelectrochemical performance of photocatalysts, one approach is to construct heterostructures. Figure 4 presents the results of ultraviolet and visible (UV–Vis) spectroscopy conducted on delaminated Ti3C2Tx MXene (at a concentration of 0.05 mg/mL), CoS, and MXene/CoS nanocomposite.

Figure 4
figure 4

UV–Vis spectra of the MXene, CoS and MXene/CoS samples.

In the dilute aqueous medium, MXene colloid displays a broad UV absorption spectrum with peaks observed at 225 and 275 nm26,27. Based on the UV–Vis characterization, it's clear that the delaminated MXene exhibits significant absorption in the UV region spanning from 225 to 365 nm. This outcome is anticipated due to the functionalization of the MXene surface with different groups following the removal of the A-element from its precursor ternary transition metal carbide, also known as the MAX phase, during the synthesis process. The absorption peaks of CoS and MXene/CoS nanocomposite appear at wavelengths ranging from 210 to 358, and 553 to 657 nm, respectively. The nanocomposite exhibits higher photoelectrochemical properties compared with pure CoS nano-powder. The improved photoelectrochemical efficiency can be ascribed to the augmentation of light absorption and the decrease in the recombination rate of photogenerated electron–hole pairs, which stem from the creation of the heterostructure. Interestingly, the results indicate that the nanocomposite expands the absorption spectra. Tauc's plot analysis28, as illustrated in Fig. 5, estimates the band gaps of MXene and CoS to be 1.86 eV and 3.54 eV, respectively. Additionally, the nanocomposite reduces the band offset at the interface between the nanocomposite-SnO2 and the perovskite layers.

Figure 5
figure 5

Band gaps of nanocomposite, MXene, and CoS estimated by (alpha*hυ)2vs. photon energy curve.

CV & EIS characterization of the MXene, CoS and MXene/CoS based ETL

To verify the proposed new solar cell layer that contains an MXene-based nanocomposite, several strategies can be used for the evaluation and analysis of the measurement results. Electrochemical techniques, such as electrochemical impedance spectroscopy (EIS), and cyclic voltammetry (CV) can be used to evaluate the electrochemical performance of the new solar cell layer and its components. Also, they can provide valuable information about the properties and performance of the proposed new solar cell layer and help to verify its potential for use in practical applications29. The presence of a higher reduction current density peak and a lower peak-to-peak separation (Epp) value serves as an indication of the strong catalytic reduction capability of Sx−2 at the ETL layer30. As depicted in Fig. 6, the MXene/CoS-ETL exhibits a higher reduction current density compared to the bare CoS-ETL and Ti3C2Tx-ETL. Furthermore, the nanocomposite material exhibits an increase in the area under the CV curve and a transition from asymmetrical to symmetrical shape. This observation indicates a positive impact on the electrocatalytic activity.

Figure 6
figure 6

Shows the cyclic voltammetry (CV) profiles of the pure MXene, CoS and MXene/CoS.

The Nyquist plots of Ti3C2Tx, CoS, and Ti3C2Tx /CoS-based ETL are shown along with the equivalent circuit fitting parameters, including series resistance (RS), charge transfer resistance (RCT), and C1 corresponding to the capacitance. In the symmetric dummy cell, the Ti3C2Tx/CoS counter electrode (CE) displayed the smallest values for RS (5.125 ohms), RCT (1048 ohms), and C1 (4.925e−3 F). The lower RS, RCT and higher C1 values suggest that PSCs with MXene/CoS CE display the better performance31. The origin of RS is associated with the resistance of the ITO substrates, while RCT is related to the resistance at the interface between the ETL and the perovskite layer. In this study, the semicircle observed in the high-frequency range of the EIS spectra offers valuable insights into the charge carrier recombination process, specifically the interfacial recombination and charge transfer processes from the ETL to the ITO electrodes. The rapid nature of the charge transfer process prevents its separation from the interfacial recombination. On the other hand, the semicircle observed at relatively lower frequencies corresponds to ion migration processes within the electron transfer layer32.

Figure 7 show the Bode and Nyquist plots progression with different electron transport layers. In the high-frequency region of the EIS spectra, a single semicircle was observed, corresponding to a single peak in the bode plot.

Figure 7
figure 7

Presents the Nyquist plot curves of symmetric dummy cells equipped with Ti3C2Tx, CoS, and Ti3C2Tx/CoS -based ETL. The inset within the figure provides a closer look at the EIS curves and displays the equivalent circuit employed for fitting the EIS data.

The parameters of EIS from the semicircle Nyquist plot are calculated and summarized in (Table 1). The rise in resistance suggests a decrease in charge recombination at the interface between CoS and ITO. Due to the limited rate of carrier recombination at the CoS/ITO junction, it is rational to expect that the CoS electron transport layer (ETL) exhibits both superior Jsc and Voc in comparison to those of the MXene-ETL33.

Table 1 Electrochemical parameters fabricated with the different ETL calculated from EIS analysis.

Furthermore, the nanocomposite material exhibits an increase in the area under the CV curve and a transition from asymmetrical to symmetrical shape. the increased surface area resulting from doping facilitates the availability of more electrochemically favorable and active sites, thereby promoting higher conductivity. Electrochemical impedance spectroscopy (EIS), can be used to evaluate the electrochemical performance of the new solar cell layer and its components. The R2 of the MXene/CoS-ETL was decreased, this phenomenon can be attributed to the enhanced electron back transfer process, resulting in rapid charge recombination events. The presence of high series resistance in a device often results in a poor fill factor, which is a measure of its performance. Consequently, the justification for carbon-based perovskite solar cells (PSCs) exhibiting a lower fill factor is attributed to the inherent high series resistance associated with carbon-based materials. This resistance adversely affects the device's ability to efficiently collect and transport charge carriers, leading to reduced fill factor values34,35. It is also revealed that with the MXene/CoS-ETL, the RCT was decreased, this phenomenon can be attributed to the enhanced electron back transfer process, resulting in rapid charge recombination events.

The perovskite solar cells device characterization

Figure 1 depicts the manufacturing schematic of perovskite solar cells (PSCs) to confirm the performance boost caused by the insertion of the electron transport layer (ETL). The choice and qualities of the ETL can have a significant influence on the overall performance and efficiency of the produced solar cell. The ETL supports efficient charge movement, reduces recombination losses, improves electron extraction from the photoactive layer, and improves the overall electrical efficiency of the solar cell. Thus, careful attention and optimisation of the ETL are required to get high-performance solar cells.

The top-performing MXene-CoS/SnO2-based PSC was named the champion device, and its performance was determined by the concentration of MXene-CoS/SnO2. Figure 8 depicts the PCEs of PSCs at different concentrations. The best concentration, 2 mg/ml, resulted in the champion device with an enhanced PCE of 17.69%, a fill factor (FF) of 66.51%, an open-circuit voltage (Voc) of 1.282 V, and a short-circuit current density (Jsc) of 20.74 mA/cm2. Understanding and analysing these edge effects in the J-V curves of champion devices made from various MXene/CoS nanocomposites is critical for optimising device performance, identifying limitations, and guiding improvements in materials, device fabrication, or device engineering to improve solar cell efficiency and stability. Analysing the J-V curves around the open-circuit voltage (Voc) has helped determine the device's efficiency, stability, and limitations. This research provides critical insights that will affect material optimisation, manufacturing methods, and device engineering, ultimately enhancing the overall performance of solar cells. Furthermore, improved characterisation techniques and theoretical modelling can help to clarify the precise elements that influence these curve properties.

Figure 8
figure 8

Current density of the champion devices based on various MXene/CoS nanocomposites.

The enhanced FF value can be linked to an improved contact interface between the perovskite and ETL films, contributing to a more balanced charge transport and decreased accumulation of interface charges. Figure 9 illustrates the current density versus voltage (J-V) profiles of the perovskite solar cells (PSCs) deposited on SnO2 ETL (depicted by the grey curve) and MXene-CoS/SnO2 ETL (depicted by the blue curve) under 1 sun (AM 1.5 G) illumination. The power conversion efficiency (PCE) rose from 13.81% for the control PSC based on pure SnO2 ETL to 17.69% (as seen in Table 2). The open-circuit voltage (Voc) in perovskite solar cells can decline due to material defects, perovskite degradation caused by environmental factors, hysteresis effects, subpar interface quality, doping inconsistencies, and material degradation over time. Overcoming these challenges is essential to boosting Voc and enhancing the overall performance of the device. The leading PSCs utilizing MXene-CoS/SnO2 ETL showcased notably improved performance, resulting in a noteworthy PCE. This enhancement in performance can be attributed to the amplified Jsc and FF, which were facilitated by diminished charge recombination and an enhanced quality of the perovskite film, respectively.

Figure 9
figure 9

Illustrates the current density versus voltage (J-V) curves for PSCs based on the SnO2 and MXene-CoS/SnO2 ETLs under 1 sun (AM 1.5 G) illumination.

Table 2 Photovoltaic parameters of PSCs with different amount of MXene based nanocomposite.

To discover the appropriate settings and examine how physical variables impact model performance, numerical simulation of a photovoltaic device is required. The simulation approach is validated by comparing its results to experimental data. In this work, the SCAPS-1D programme is used to simulate the device, comprehensively investigating the effect of various structural characteristics of the electron transport layer (ETL) on the solar cell's performance.

The suggested device structure is ITO/MXene-CoS/SnO2/Perovskite/Spiro-OMeTAD/Ag, with MXene-based innovative nanocomposites-doped SnO2 serving as the ETL for the next generation solar cell devices. The purpose of this numerical simulation is to show how solar cell efficiency may be increased by properly capturing incident light on its surface and optimising its performance. The superiority of PSCs with CoS, MXene, and MXene/CoS over SnO2 is further confirmed through the incident photon-to-current efficiency (IPCE) measurement, as shown in Fig. 10. The MXene/CoS exhibits better IPCE characteristics than SnO2, providing additional evidence of its improved performance as an ETL for the solar cell. The extended wavelengths beyond 780 nm in the IPCE of SnO2 and MXene-CoS/SnO2 indicate additional absorption of lower-energy photons. This happens due to factors like sub-bandgap absorption, quantum effects in nanoscale structures, and impurity-induced energy levels within the bandgap. Comparing experimental IPCE data and theoretical bandgap calculations can reveal the extent of this extended absorption.

Figure 10
figure 10

IPCE of the SnO2, and MXene-CoS/SnO2.

Conclusions

In conclusion, novel nanocomposites have been successfully developed using MXene and CoS for perovskite solar cells. The highly electrocatalytic MXene/CoS nanocomposite, used as additives to the SnO2 ETL, has been successfully synthesized through the hydrothermal technique and exfoliation process. The results also demonstrate the nanocomposite's ability to broaden the absorption spectra. Utilizing Tauc's plot, the band gaps of MXene and CoS were estimated to be 1.86 eV and 3.54 eV, respectively. X-ray diffraction (XRD) analysis confirms the high crystalline quality of the solar cell layer samples, evident by the presence of peaks at 5.6°, 25.16°, and 47.4° corresponding to the (002), (004), and (110) crystal planes of Ti3C2Tx. Additionally, the enhanced photovoltaic performance of the nanocomposites can be attributed to the conductive MXene nanosheets acting as a scaffold, facilitating the growth of small CoS nanoparticles and generating abundant catalytic active sites. These nanocomposites also exhibit excellent permeability, remarkable charge transfer, and efficient ion diffusion.

Based on the results obtained, it can be concluded that using Novel MXene/CoS nanocomposites-Doped in SnO2 as ETL is essential in determining the characteristics and properties of the solar cell layers. The nanocomposites exhibit a remarkable electrochemical performance, with R1 (5.125 Ω), R2 (1.048e−3 Ω) and C3 (4.925e−3 F) values, respectively. These values are considerably better than those achieved with ETLs containing CoS and MXene alone. Additionally, the novel nanocomposites (MXene reinforced with CoS)-doped SnO2 as the ETL demonstrate noticeable growth of SnO2 grains. HAADF STEM analysis proved that the incorporation of the nanocomposite led to an increase in the lattice spacing facets of SnO2, ultimately improving the nanocomposite as ETL additive as contrasted with the SnO2 (ETL) film under control. In summary, our investigation has confirmed that incorporating MXene/CoS nanocomposite (2 mg mL−1) as additives to the SnO2 electron transport layer (ETL) can significantly increase the efficiency of PSCs. With the optimized composition, the solar cell's power conversion efficiency (PCE) measured a remarkable 17.69%., a significant improvement over the control devices with a PCE of 13.81%. The short-circuit current density (Jsc), open-circuit voltage (Voc), and fill factor (FF) are computed at 66.51%, 1.282 V, and 20.74 mA/cm2, respectively. This design philosophy results in a 21.93% higher PCE compared to the control device. The outstanding potential of this design lies in its ability to promote electron transport efficiency and improve the quality of the perovskite layer through the introduction of 4-tert-butylpyridine as an additive. This manipulation of the PbI2 morphology enables the fabrication of efficient PSCs in ambient air with relative humidity ranging from 30 to 40%. Overall, this approach represents a way of opting for highly efficient perovskite solar cells.