The objective was to verify the performance of spectral techniques as well as validation models in the prediction of nitrogen, total organic carbon, and humic fractions under different cultivation conditions. Chemical analyses for the determination of nitrate, total nitrogen, total organic carbon, and the chemical fractionation of soil organic matter were performed, as well as spectral analyses by Vis-NIR-SWIR and X-ray fluorescence. The results of the spectroscopy were processed using RStudio v. 4.1.3, and PLSR and support vector machine learning algorithms were applied to validate the models. The Vis-NIR-SWIR and XRF spectroscopic techniques showed high performance and are indicated for the prediction of nitrogen, total organic carbon, and humic fractions in Ferralsols of medium sandy texture. However, it is important to highlight that each technique has its own characteristic mechanism of action: Vis-NIR-SWIR detects the element based on harmonic tones, while XRF is based on the atomic number of the element or elemental association. The PLSR and SVM models showed excellent validation results, allowing them to fit the experimental data, emphasizing that they are different statistical methods.