The buttons and the rest of the digitizer are separate, so you can still have working buttons but no digitizer input if that is damaged. However, I'm confused... you said your phone doesn't respond to touch or S-Pen, but then you say it does recognize the S-Pen (but your pen is broken)? So...which is it? The reason it matters is because the 'touch' digitizer is one part of the hardware, the S-Pen input is another part (separate), and then there's the display panel. They're 3 separate hardware things that can cause 3 separate issues if they fail. So if your phone doesn't respond to neither touch or S-Pen, then the whole panel might be damaged or disconnected, but if it responds to S-Pen but not touch, then it's only your touch digitizer that's damaged. While in theory replaceable, it's quite difficult and chances are you might have to get the whole thing, though.
If your S-Pen is broken I'd find a replacement one to try it on first (or visit a carrier store or Best Buy or something; the S-Pen from any Note device or Tab S tablet should work as well IF your S-Pen hardware is still working. If no S-Pen works, then your panel is either damaged or disconnected).