Bait will not attach to the fishing rod
Start with the name of the rod in inventory. A stack of worms in the hotbar does nothing to a rod without a bait socket, and an empty tackle socket accepts a different class of item.
Read the rod before buying a replacement
The Bamboo Pole and Training Rod have no bait slot. At Fishing level 2 Willy offers the Fiberglass Rod for 1,800g; it takes bait but not tackle. The regular Iridium Rod becomes available at level 6 for 7,500g and accepts bait and a tackle item. If a hook or bobber will not attach to a Fiberglass Rod but bait does, the rod is working as designed. Bait changes the time between bites. A difficult fish can still escape after you hook it.
Load the inventory slot and confirm the stack
On PC with a mouse, open inventory, pick up the bait stack with a left click, then right-click the compatible rod. Hover over the rod to inspect what is loaded. Do this while the inventory is open rather than selecting bait and clicking the water. If you attached only one piece, it can disappear on the next use; attach the stack before a long trip. To replace the type, pick up the new stack and apply it to the rod; check your inventory for the displaced bait.
Translate the input to your controller or touchscreen
On a Switch controller, pick up the bait with A in inventory and use Y on the rod. With touch controls, drag the bait onto a compatible rod in the inventory screen. On mobile, replace an attached bait type by dropping a different type on top; dragging it away is not the conventional removal method. Cast afterward and check the rod when the catch is over if you are unsure that the load took.