There are various glitches which enable you to have an unintended item on your B Button. The methods are (incompletely) listed below. Each form (human, deku, goron, zora) has their own B button item assigned at a time. The default B button item for Human, Goron, and Zora is the Kokiri Sword. For Deku, it is item #253 if you have no magic, or Deku Nut if you do.
Blank B is normal if you get your sword stolen from Takkuri, or pay for an upgrade from the Mountain Village Smithy. but there are glitched methods of obtaining it as well.
If you ride Epona without having a bow, your B button will be blank when you get off.
Weird B is an effect of having a blank B button as a transformation. The Weird B page lists the methods for getting an blank B button for the transformations. The game will use your B button action ID as if it were an item ID. This lets you use various items which are not in your inventory.
If you perform Weird B and empty a bottled item with B (drop a fish, drink Obaba's Drink/Milk/Chateau, give away the Seahorse), it will update the current form's B button to an empty Bottle.
If you bring Epona into the Curiosity Shop, you can drop a fish to delay the sale of a bottled item, then climb Epona and use the bow on B. The duped bottle will then go on your B button.
You can do a bottle dupe over certain B items such as Deku Nuts.
Deku Sword refers to having a sword on Deku Link's B button.
When buying your sword back from the Curiosity Shop, it will be placed on B. You can delay the collection of the sword by dropping a fish before buying it. Then switch to another form and walk away or catch the fish, and that form will get the sword item on B. This works to get upgraded swords on Goron and Zora B as well. The sword is powerful, dealing the same damage as the Great Fairy Sword.
A faster method that doesn't require a fish is to put on the Deku Mask on the one frame it is possible to (5f after the A press) between choosing to buy the sword and Link receiving it. Pausing on this frame and putting on the Deku Mask during unpause lag also works, but holding R does not expand the window as it does in Curiosity Shop Duping.
The State Restoring Effect of 0th Day can put the kokiri sword on Deku Link's B button.
The Goron Race puts Kokiri Sword on B when it is over, so switching to Deku Link will put Kokiri Sword on Deku Link's B button.
Deku Link has Deku Nuts on B if you have magic, and there are methods to transfer it to other forms.
You can use the State Restoring Effect of 0th Day to transfer the Deku Nut on B to forms other than Deku Link.