PHB 190, Other activity on your turn:
You can also interact with one object or feature of the environment for free, during either your move or your action. For example you could open a door during your move as you stride towards a foe, or you could draw your weapon as part of the same action you use to attack.
PHP 193, Use an Object (as an action)
You normally interact with an object while doing something else, such as when you draw a sword as part of an attack. When an object requires your action for its use, you take the Use and Object action. This action is also useful when you want to interact with more than one object on your turn.
Using the above two references drawing a vial from a belt pouch would be a free action. Drawing a object from a backpack would be a Full action. In either case throwing/drinking/deploying ext also takes an use object action.
I don't have the text for the bag of holding I believe the activation is you place your hand in the back of holding and mentally call the item you want retrieved. If the bag of holding is a satchel placing your hand into it can, call an items name and withdrawing it could be interpreted as a free action as part of a move.
In contrast you could focus on using a magic item (bag of holding) is an action. I believe that this can be interpreted by the DM on if the bag of holding behaves like a belt pouch or satchel or a magic item.
Depending on this interpretation is could be: one free action (dependent on you having a free hand) and one action; or two actions.