Assuming games are all downloads, you have to specify. Sometimes you are given an option and sometimes you have to set up your default installation destination in the app.
I found this by doing a search for "how to install Steam games to D Drive."
Connect the external drive to your system.
Open Steam client.
Purchase the game if you haven’t already.
Go to Library and select the game.
Click Install.
A new window will open. Open the ‘Choose location for install’ dropdown, and select your external drive.
Select the root of the external drive to install the game and click ‘Select.’
On the next window that opens, click OK and do not change the name of the folder that Steam has set.
On the main install window, click ‘Next,’ and the game will begin to download.
Allow the game to finish downloading and play it.