Then try to connect while the pen still in its place
Only then it's battery charges
Except for writing you don't need any battery
Please try the following:
Restarting your device can help fix minor issues and may help the S Pen connect again.
On devices with a regular Power key, press and hold the Power key until the Power menu is displayed. Tap the Power icon at the top of the screen, and then tap Restart. Tap Restart again.
Change certain settings if only the bottom of the screen does not recognize the S Pen.
The bottom area of your device’s screen contains the Navigation bar and may not recognize touches or taps with the S Pen. Here are some tips if the S Pen is being recognized everywhere except for at the bottom of the screen:
Tap or touch the bottom portion of the screen slowly when using the S Pen.
Allow multiple S Pens to be used on your device. Navigate to Settings, tap Advanced features, and then tap S Pen. Tap the switch next to Allow multiple S Pens to turn this on or off.
Turn off Block gestures with S Pen. Navigate to Settings, tap Display, and then tap Navigation bar. Under Full screen gestures, tap the switch next to "Block gestures with S pen" to turn this off.
Set your navigation type to Navigation buttons. Navigate to Settings, tap Display, and then tap Navigation bar. Tap Navigation buttons, and then try using the S Pen.
Hope this is helpful