If you already have a subgraph and are looking to deploy it on Alchemy Subgraphs, see Deploying a Subgraph.
To create a subgraph from scratch:
graph init --product hosted-service
To create a subgraph that indexes all events of an existing contract:
graph init \ --product hosted-service --from-contract <CONTRACT_ADDRESS> \ [--network <ETHEREUM_NETWORK>] \ [--abi <FILE>] \ <subgraph name>
The ABI will be fetched from Etherscan. If it can't be found, the
--abi file will need to be specified.
Alchemy Subgraphs has several example subgraphs for you to instantly deploy. See your dashboard to get started.