The "wanting" used here has to do with needs. As to, 'is wanting a sin", it is alright to have desires but we aren't to be covetous.
When God's people follow their Shepherd, they have all that they need and will not lack the necessities of life (37:25; Matt 6:33; Phil 4:19). Sheep will not lie down when they are hungry, nor will they drink from fast-flowing streams. Sometimes the shepherd will temporarily dam up a stream so the sheep can quench their thirst.
(from The Bible Exposition Commentary: Old Testament © 2001-2004 by Warren W. Wiersbe. All rights reserved.)
The next words are a sort of inference from the first statement — they are sententious and positive — I shall not want. I might want otherwise, but when the Lord is my Shepherd he is able to supply my needs, and he is certainly willing to do so, for his heart is full of love, and therefore "I shall not want." I shall not lack for temporal things. Does he not feed the ravens, and cause the lilies to grow? How, then, can he leave his children to starve? I shall not want for spirituals, I know that his grace will be sufficient for me. Resting in him he will say to me, "As thy day so shall thy strength be." I may not possess all that I wish for, but "I shall not want." Others, far wealthier and wiser than I, may want, but "I shall not." "The young lions do lack, and suffer hunger: but they that seek the Lord shall not want any good thing." It is not only "I do not want," but "I shall not want." Come what may, if famine should devastate the land, or calamity destroy the city, "I shall not want." Old age with its feebleness shall not bring me any lack, and even death with its gloom shall not find me destitute. I have all things and abound; not because I have a good store of money in the bank, not because I have skill and wit with which to win my bread, but because "The Lord is my shepherd." The wicked always want, but the righteous never; a sinner's heart is far from satisfaction, but a gracious spirit dwells in the palace of content.
(from The Treasury of David, PC Study Bible formatted electronic database Copyright © 2005 by Biblesoft, Inc. All rights reserved.)