As shown in Table and Figures and, the concentration of trace metals (Cd, Cr, Cu, Mn, Ni, Fe, Pb, and Zn) in compost from waste sites, cultivation soil, maize plants, and spinach crops was measured and compared to the limitations of Directive 2014/118/EU. The percent of heavy metals in maize plants and spinach crops growing in the soil varied. Although the amounts of Cd, Cr, Cu, Mn, Ni, Pb, and Zn were higher than those allowed by the EU, they were still comparatively lower than those discovered in compost from waste sites, suggesting that the soil had mitigated some of the effects. All the heavy metals' computed index values were less than 1, meaning that, on average, the concentrations of these metals in spinach and maize vegetables were lower than those in compost from waste sites and cultivated soil. notably lower levels of contamination as compared to compost from a dumpsite. However, higher than permitted limits set by the EU Directive were the amounts of Cd, Cr, Mn, Ni, and Zn in cultivable soil. This increases the risk of contaminated soil, which might be detrimental to crop growth and food safety. The soil-grown spinach and maize plants had different concentrations of heavy metals. There was some mitigation by the soil since, although the concentrations of Cd, Cr, Cu, Mn, Ni, Pb, and Zn were higher than the EU limits, they were still comparatively lower than those reported in compost from trash sites. Nonetheless, it is significant that maize plants' Cd contents were higher than the EU limit, potentially endangering the health of consumers. Trace metal study on soil and soil around a municipal solid waste dumpsite produced similar findings . To guarantee food safety and environmental health, more monitoring and remediation operations are essential, since the index values still point to severe pollution.