Surface pro plugged in not charging, most cases it is an issue of the power adapter charger.
So the solution is to buy the right charger for your Surface pro.
For Surface Pro 1 and Pro 2, the one below is the right one.

For Surface Pro 3, 4, 5(2017), 6, 7, X, the one below is the right one:
