Try a different charger and if that doesn't change anything it's probably a logic board issue. Logic boards themselves are very expensive as they include the CPU/Ram/Storage etc all onboard. Certain mail in board repair services exist like Louis Rossmans company in New York may be able to help you at that point, or a data recovery company if your information is of value.
M2 may be new enough to be under limited warranty or applecare if you opted for this. Check into your coverage and if you have any go down that route.