Hi Aditiya
In OKB9 settings , you need to assign Cost Element (XXXX) to Cost Centre(YYYY) which is default setting.
Also, assign Cost centre(YYYY) to WBS Element (ZZZZ) in CJ20N transaction.
This assignment will be automatically populate the Cost centre to WBS.
Hope, this will help.
Best Regards,
Venkateswara