You cannot trap heat. Heat has no location. Heat has no temperature. It is not possible to measure the temperature of the Earth.
Yes you can trap heat. You wear a coat to keep yourself warm. That is trapping your body heat.
It is possible to measure the temperature of anything using a thermometer.