This is called induction, and the classic example of this type of reasoning involves checking the colour of as many swans as you can find, then extrapolating a rule to say “all swans are white”.