1.“多少”can represent a lot of numbers,from 1 to a very big number .but “几”often represent the number from 0 to 9.
For examples ,①if you ask a child’s age ,you can use “ 你几岁了?”or “你多少岁了?”.②But if you ask an adult’s age ,you can’t use “ 你几岁了?”,you should use the “你多少岁了?”③全世界有多少人?How many people are there in this world? ,Now, you can’t use “几” .
2.When the number is small ,you can use both "多少"and "几".
(1)If you want to use the “几” in a sentence, you should add the quantifier after the wold “几”,before the noun .If you use the “多少” ,you don’t need to add the quantifier .(PS: The quantifier in Chinese is one part of speech to express the quantity unit .Eg: 一本书-------“本”is a quantifier .一个苹果------“个”is a quantifier. )
For examples .you can use “你买了几本书?”Or “你买了多少书?”.Both are correct.
(2)Sometimes we may omit the noun .Then we can’t use the “几”.
For example ,the merchants who sold the watermelons asked the customer “你要买多少?” Here we omit the watermelon after the “多少”. And you can’t use the word “几” here .If you want to use the “几”,you should add the quantifier and the noun ,and you can say “ 你要买几斤(公斤)西瓜?”
3.sometimes ,we use "几" in a declarative sentence. Here “几”means “a few”.
For example, 他拿了几个硬币就出去了(He took a few coins and went out ). Here 几 means “a few ”.Now we can’t use the “多少”.
I hope it helps you !