Often used interchangeably by some speakers.
But
Small = of a size or amount that is less than usual.
Little = more often used to describe an extent or degree of something.
A small car or a little car both are OK
Little
used to emphasize how small an amount is.
"I have little doubt of their identity" correct. means you are sure of their identity.
"I have small doubt of their identity" incorrect wrong.
"I have little doubt in my mind" correct = you are sure - certain
"I have a small doubt in my mind" correct = you are almost sure -almost certain with a tiny doubt
it is something that you will have to acquire over time with practice and exposure to the language.
In 98% of cases you can probably interchange the two words.