Who invented the modern pen?
I assume you mean the Ball Point Pen. The combination of a Ball and Socket with a suitable viscous Ink was first patented by Laszlo Biro in 1938.
The ball and socket idea had been patented by John Loud in 1888. He was creating something that would mark a rough surface like wood. It was not suitable for letter writing.
Metal Nibbed Pens had been found since Roman times. Re-fillable fountain pens since the 1800s
Much effort was expended trying to find a suitable Ball Point Pen.
Laszlo Biro was a Hungarian who with the help of his brother Gyorgy, a chemist, created an Ink that lubricated the ball and socket mechanism so that it could write evenly on a paper surface. The Biro brothers fled Europe in 1941 to Argentina and produced their Pen there. Most modern ballpoint pens are copies of this original design.