Even though it includes rolling a die, Vexing Puzzlebox's second ability is a mana ability. It does not use the stack and cannot be responded to.

Artwork
Loading artwork…
Vexing Puzzlebox
Commander Legends: Battle for Baldur's Gate · #343 · EN
Nonfoil—Foil—
Card rules
Whenever you roll one or more dice, put a number of charge counters on this artifact equal to the result.
: Add one mana of any color. Roll a d20.
, Remove 100 charge counters from this artifact: Search your library for an artifact card, put that card onto the battlefield, then shuffle.
Mythic · Illustrated by Volkan Baǵa
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If an effect instructs you to roll more than one die and ignore one or more of them, the result is only what wasn't ignored.
If an effect instructs you to roll one or more dice and add some number to that roll, the result is the total after adding that number.
In a game of Planechase, the result of rolling the planar die is not a number and does not cause Vexing Puzzlebox's first ability to put charge counters on it.