Ceria-based mixed metal oxide (rare-earth-based) nanocomposites have become well-known and play an important part in contemporary nanotechnology research due to their superior photocatalytic, biological, and electrochemical performance. A Ce0.8Y0.2 O2-δ–Ce0.8Sm0.2O2-δ (CYO-CSO) nanocomposite was fabricated utilizing a chemical precipitation technique for a variety of applications. For structural study, Fourier transfer infrared (FT-IR) spectroscopy, X-ray powder diffraction (XRD), and thermographic analysis (TGA) were used, as well as Scanning Electronic microscopy (SEM) and Energy dispersive X-ray analysis (EDX) for morphological and elemental analysis. There was no secondary phase seen during the creation of fluorite cubic crystal arrangement. XRD and FTIR were used to reveal the metal-oxygen connection. UV–Vis spectroscopy was used to calculate the optical bandgap of the produced nanocomposite. Electrochemical characteristics were discovered when conducting electrochemical impedance studies (EIS) at a frequency range of 40 Hz to 6 kHz and a voltage of 1.3 V. Methylene blue (MB) was utilized to estimate photocatalytic performance. The photocatalytic performance of CYO-CSO nanocomposite for MB dye was shown to be superior (93%). The antibacterial characteristic features of the synthesized CYO-CSO nanocomposite against foodborne pathogens are satisfactory.