Unable to Add Variant to Item

I’m trying to add a variant to an item, but the Add Variant option is not visible in the item view page. Did I miss something while creating the item?

Check if the Has Attributes option was enabled while creating the parent item.

Also confirm that at least one attribute (like Size or Color) was selected for the item. If attributes were not assigned during creation, the system will not allow variants.

Yes, attributes were not selected earlier. After updating the item, the Add Variant option appeared.