For the Huns, Qin Shihuang adopted a policy of active defense. "On Qin Dynasty" wrote: "Meng Tian built the Great Wall in the north and guarded it with a hedge, but the Xiongnu was more than 700 miles away", that is to say, Qin Shihuang didn't choose to build the Great Wall because it was more than 700 miles away from the Xiongnu, so he built it only when he gained a strategic position. While building the Great Wall, Meng Tian also took the Great Wall as a stronghold and took the initiative to attack the Huns for defense many times.
I don't think Qin Shihuang thought it useful to beat Xiongnu. Before Qin Shihuang took the initiative to attack the Huns, he had to consider what would happen if he defeated them. The situation at that time was that it did not do much good to defeat, but only increased the consumption of war. Before Qin Shihuang 1000 years of history, the central plains regime constantly competed with the surrounding nomadic peoples, and basically established a reasonable sphere of influence between the two sides in the battle with the Huns. Beyond this range, it won't do much good to each other.
Qin Shihuang believed that as early as the time when Dayu divided Kyushu, there was a so-called "distinction between Chinese and foreigners" in later generations. Especially after the establishment of the Zhou Dynasty, the scope nominally under the jurisdiction of the Zhou Emperor can be regarded as "the world", while the Xiongnu activities outside the famine were not within the scope of "the world" at all. So the cost of attacking Xiongnu is too high; Even if you win, you can't keep it. It's better to build the Great Wall and wait.