You gotta leave Snowdin immediately after Sans bring you there when the game gives you the option to explore. This gives you the Greater Dog encounter which'll give you the option to get the stick when you spare em
Oh alr ! Thanks ^^