Hello Jesus
When plain STP is implemented (that is, 802.1D) then yes, only the root bridge generates BPDUs and they are relayed by the rest of the switches that receive them. However, in RSTP, all switches generate BPDUs. This is further described in the following Cisco documentation:
I hope this has been helpful!
Laz