O/B Thermostat Wire: Heat Pump Reversing Valve (O vs B Setting)
A heat pump heats or cools by flipping a reversing valve. Most brands (Carrier, Trane, Goodman, Lennox, etc.) energize the valve in cooling, labeled O. Rheem, Ruud and a few others energize it in heating, labeled B.
Smart thermostats have one O/B terminal and a setting to pick O or B. If heat comes on when you ask for cooling (or the reverse), the setting is wrong. Nothing is damaged; just switch it in the app.