How to detect item in inventory with custom data

Hello, I been struggling to detect item with custom data in the inventory. It does nothing. What did I do wrong? I did this: execute as @a[name=player] if items entity @s inventory.* stick[custom_data={broom.stick:true}] run item replace entity @s hotbar.0 with stick[minecraft:custom_name='{"text":"Broom","italic":false}',custom_data={broom.stick:true},consumable={consume_seconds:999999999}]
Continue to help post