Do l just need a chest transmitter or the device as well there not cheap
You don’t need a heart rate monitor to ride on Zwift, no.
A chest strap should pair with whatever device you are running Zwift on. There is no need for an intermediate device.
There are two data protocols - Ant+ and Bluetooth. Buy a chest strap that supports both and you should be ok.
Can you clarify your question: were you asking if you need an chest-strap HR monitor at all (no, you don’t, but it’s helpful) or some type of other device?
You’ll need some type of device to run Zwift of course but it’s designed to run on just about anything - old-ish smartphone, tablet, AppleTV4K, a Windows or Mac PC.
If you are buying a chest strap HRM and are on a budget, the CooSpo h808s is a rebranded “Biostrap” and fantastic for the money. I’ve had several and recommend them. If money isn’t an issue, the Garmin HRMPro+ and Polar H10 are top-tier. All of these will broadcast over the major fitness protocols: ANT+ and Bluetooth Smart (aka BLE/Bluetooth Low Energy).
polar chest straps are regularly on sale on amazon and are WELL worth the money for any athlete looking to improve.