As mentioned in the comments, what you saw was a function of Alex's suit.
The [Arrowverse wiki][1] lists the abilities the suit possesses, the one in question being;

> **Magnets:** The suit's gloves are magnetic, which allow Alex to pull her weapons towards her if disarmed. She has also used the magnets in the suit to make a magnetic shield to defend herself or to contain explosives. 

  [1]: https://arrow.fandom.com/wiki/Alex_Danvers%27s_suit