Yes, in many cases a TV can be installed above a fireplace, but requirements vary by fireplace and TV.
Always check the fireplace manufacturer's installation instructions for required clearances, mantel requirements, and heat-management guidelines. You should also review the TV manufacturer's instructions for mounting and acceptable operating temperatures.
Excessive heat can damage a TV or shorten its lifespan. A mantel, heat shield, or manufacturer-approved heat-management system may help redirect heat.
Never assume a standard clearance applies to every fireplace. Always follow the manufacturer's installation instructions and, when in doubt, consult a qualified fireplace professional.