The correct option is
B A little
Option A: The word, 'few' is a determiner which is used to refer to
a small number of countable nouns. In the given sentence, the word, 'knowledge' is an uncountable, abstract noun. Hence, the word, 'few' is not appropriate and option A is incorrect.Option B: The phrase, 'a little' is a determiner which means 'small in amount, degree or size'. It is used with uncountable nouns. As the word, 'knowledge' is an uncountable, abstract noun, this determiner is most appropriate. The idiom, 'A little knowledge is a dangerous thing' means: A small amount of knowledge can mislead people into thinking that they are more expert than they really are. Hence, option B is correct.
Option C: The word, 'some' is a determiner which refers to an unspecified amount or number of something. It could be more or it could be less.
Option D: The determiner, 'any' is used to refer to one or some of a thing or number of things. It does not convey how much or how many.
As both the words ('some' and 'any') do not specifically refer to either a small or large amount, these words are not appropriate to be used in the blank. Hence, options C and D are incorrect.