I will start briefly reviewing the theoretical features and experimental status of thermal dark matter (DM) with mass below the electroweak scale (m_dm << 100 GeV). In this class of models, DM and visible matter (VM) are initially in thermal equilibrium during the early universe. At this phase, DM and VM annihilate into each other at equal rates via a new interaction mediated by a massive vector boson, called dark photon (A'). But as the universe expanding they decouple from each other and the DM number density becomes fixed to its value when equilibrium is lost. The predicted parameter space for the DM-VM annihilation cross-section, the DM relic abundance, implies particular DM and A' masses and their couplings which define an explicit sharp target which can be probed with high-energy experiments at today's accelerators. In this talk, I will present the latest results on searching for sub-GeV DM with the NA64 experiment at the CERN SPS, obtained from the analysis of data sample collected during 2016-2018. Moreover, new recent results on searches for a new X17 boson which could explain the anomaly observed in the 8Be and 4He nuclei transitions, and axionlike and scalar particles produced though Primakoff reaction will be also discussed. Finally, the future prospects after the CERN long-shutdown in 2021 will be also covered.