The continuous demand placed on farmland to yield optimal harvest is dependent on the continuous application of agrochemicals and fertilizers to increase soil fertility and manage diseases. Successive application of fertilizers and use of agrochemicals coupled with metal and steel industries introduce potentially toxic elements into the soil. Active agricultural activities and industrial emissions that result in atmospheric cadmium (Cd) injection and active deposition on agricultural soil (particularly from the primary metal industry, steel and iron industrial production). The concentration of cadmium in the study area exceeds the local background value. As a result, excessive cadmium soil concentration will contribute to increased toxic and carcinogenic effects, with negative implications for both environmental and human health. Therefore, determining the spatial distribution of Cd is critical for environmentally friendly agricultural production and reducing Cd emission into soils. The goals of this study are to (i) determine the variability of Cd prediction in agricultural soil using spectral indices or terrain attributes coupled with modeling algorithms, and (ii) determine whether combining spectral indices and terrain attributes coupled with modeling algorithms can improve Cd prediction efficiency in agricultural soil. The study applied three modelling scenarios, comprised prediction using terrain attributes coupled with digital soil mapping (DSM) approaches (Scenario 1), prediction using spectral indices combined with DSMs (Scenario 2), and prediction using a combination of terrain attributes, spectral indices, and DSMs (Scenario 3). Gaussian process regression (GPR), partial least square regression (PLSR), extreme gradient boosting (EGB), multivariate adaptive regression splines (MARS), Bayesian regularized neural network (BRNN), regularized random forest (RRF), Bayesian generalized linear model (BGLM), and M5 tree models were the DSMs used in the study. The M5 tree model and terrain attributes {Scenario 1 R2 = 0.77, concordance correlation coefficient (CCC) = 0.73, root mean square error (RMSE) = 0.45, mean absolute error (MAE) = 0.37 and median absolute error (MdAE) = 0.35}, EGB and spectral indices {Scenario 2, R2 = 0.83, CCC = 0.76, RMSE = 0.54, MAE = 0.33 and MdAE = 0.23} and the M5 tree model, spectral indices and terrain attributes {Scenario 3, R2 = 0.84, CCC = 0.81, RMSE = 0.39, MAE = 0.31 and MdAE = 0.24} were the overall best combinations that predicted Cd in the agricultural soil. The overall evaluation of the approaches suggested that the combination of spectral indices, terrain attributes, and the M5 tree model in Scenario 3 was the optimal technique for predicting Cd in agricultural soil. Thus, a combination of environmental covariates with a high correlation with the response variable, combined with appropriate modeling techniques predicting potentially toxic elements in agricultural soil, will produce the best results.