I was walking when I hit my right thumb knuckle and I felt instant pain and it immediately swelled and now it really hurts. I don't think I broke it or it would hurt a lot worse. I don't think I need to go to the doctor but is pretty swollen and is bother

Finger pain. If you simply hit your finger against something but can bend it, and it was not high velocity with the injury, then likely not broken. Ice it and if not better in one week, then see Dr.