The CsPbBr₃/ZIF-8 (CPB/ZIF-8) nanocomposite was synthesized using a straightforward mixing process. Initially, 30 mg of ZIF-8 powder was dispersed in 2 mL of hexane and sonicated for 5 minutes to achieve uniform dispersion. Subsequently, 3 mL of CsPbBr₃ (CPB) solution in hexane was introduced into the ZIF-8 dispersion. The mixture was again sonicated for 5 minutes to ensure uniform mixing, followed by stirring under a vacuum at 50°C overnight to facilitate the efficient incorporation of CPB NCs into the ZIF-8 framework. The precipitate formed was collected by centrifugation at 9,000 rpm for 10 minutes and washed with hexane (2× 10 mL) to remove the excess NCs. Finally, the purified CPB/ZIF-8 nanocomposite was dried under vacuum at 50°C for 6 h. This method yielded a highly uniform CPB/ZIF-8 nanocomposite, ensuring effective interaction between the CPB NCs and the ZIF-8 framework.