An electric fireplace can be installed under a TV but it must be ensured that the TV doesn’t block the heater on the fireplace.
Different models of electric fireplace will have the heater located in different positions. If you’re putting an electric fireplace under a TV then look to buy an electric fireplace that has a heater located towards the bottom of the unit.
This will help to ensure that the TV is located as far away from the heater as possible and to help prevent the TV from being damaged.