Lessons will let you know if you are doing something wrong.
Incorrect hand position will cause all kinds of problems.
You might also be using too big a gauge of strings.
Your guitar strings may be set up so that they are too high off the fret board. This can be fixed.
If you are interested, give it a try. It should not be painful long term.
My husband gave up the first time that he started playing because of pain. His guitar was set up with extremely high action and it hurt my hands even though I had played for years. He was going to get it fixed, but he ended up trading guitars.
Different types of guitars may be easier or more difficult to play.
Acoustic steel string guitar (the most common guitar people start on) is the hardest to play to me.
An acoustic nylon string (classical) guitar is easy to play, but if you get a cheap one it will probably play out of tune.
Electric guitars are easier to play, especially if you get one with a neck that fits your hands well and don't use giant strings.