Unlike CS:GO, CS2 allows you to bind based on the weapon's specific name or its position in your loadout.

: For a permanent setup that loads every time you launch the game, you should add your scripts to an autoexec.cfg file located in your game's config folder. Key Command Systems in CS2

Guide :: Converting CS:GO buy binds to CS2 - Steam Community