Microsoft specifically recommends using a genuine Microsoft or Microsoft-licensed power supply, and warns that incompatible/counterfeit charging accessories can damage the device and may create safety risks.
See:
Surface charging requirements and power supplies
Don't continue testing it if the Surface is becoming unusually hot or shutting down.
Get a genuine Surface charger suitable for the Surface Pro 6 and test it. If the overheating disappears, the third-party charger may have been contributing to the problem.
A battery that now lasts virtually no time after years of use is consistent with significant battery aging. Microsoft notes that lithium-ion batteries lose capacity with age, and excessive aging can sometimes lead to battery expansion.
If the Surface becomes very hot or shuts down again, stop using it until it cools. Microsoft says Surface devices are designed for operation up to about 95°F/35°C ambient temperature, and an over-temperature condition can cause an immediate shutdown.
See:
What to do if your Surface power supply doesn’t work
One important point: because your Surface Pro 6 was purchased in 2019, the standard warranty is almost certainly expired. Microsoft may therefore offer a paid replacement/service option rather than a warranty repair.
See: