It’s not unusual to experience some form of discomfort when start playing the guitar as a beginner, especially your fingers. As you continue to play you will develop calluses on the fingers of your fretting hand which will lessen the discomfort considerably.
If for any reason you stop playing regularly for a time, it’s likely that you will lose those calluses.
Don’t be disheartened, your calluses will re-develop in no time. If you have any persisting pain, it would be advisable to have the setup of your guitar checked. Particularly the action of the guitar. (The height of the strings above the frets.) Of course, if you have any doubts about the cause of your pain, seek medical advice immediately.