Click the Browse button in the main window, click on the deck from the sidebar on the left, select the cards you’ve moved there, right-click and select Change Deck.
Alternatively, if this was the last action you’ve taken in Anki, you may be able to use the Undo function from the Edit > Undo menu item (Should be similar on a Mac too).
