You're cherrypicking.
San Marino may have kept Denmark down to 2-1, a scoreline considered embarrassing by Danish fans and a very poor performance, but they also recently lost 6-0 to Estonia.
Plus, as said, they have won 1 game in 16 since the Nations League was set up against Belarus, Luxembourg, Moldova, Liechtenstein, Gibraltar and Malta. The highest ranked team in the current League D setup is Moldova at 152nd in the world, below teams like Afghanistan, Antigua and Turkmenistan. That's the best team in that level of the Nations League. Gibraltar, who recently beat San Marino and are above them in the world rankings, are below Pakistan, East Timor and Bangladesh.