I understand that these days CSMA/CD i.e. ethernet one isn't used at all because we have full duplex network. Thus, there is no chance of collision here. Also, we don't use hubs anymore. Each switch port has a different collision domain. The question is in Wifi world - is CSMA/CA - collision avoidance is useful or not. I believe in 802.11 there is no concept of duplexity so how does it work?
CSMA/CA is used with Wifi and it's useful. Since "air" is generally a shared medium, no two stations must transmit simultaneously. Collisions are possible and need to be avoided/handled with.
"How does it work?" is much too broad to answer here.
With full-duplex links, no collision handling is required at all since there can be no collisions.
CSMA/CD is used in Ethernet networks to prevent collisions by checking whether the medium is idle before sending a packet.
CSMA/CA is used in wireless networks to prevent collisions by checking whether the channel is idle before sending a packet.
Collisions can still occur in wireless networks, because two devices trying to access the access point at the same time causes a collision when both are authorised to use the same channel.
CSMA/CA is useful.