Follow these steps in order to add Optimism or Arbitrum to your Metamask wallet:
Select the dropdown menu on top of the Metamask extension that reads “Ethereum Mainnet”.
Then select “add network” at the bottom of the menu extension. Note: this will open a new tab
Add Optimism by entering the following information into the fields and then selecting "save":
Network Name: Optimistic Ethereum
New RPC URL: https://mainnet.optimism.io
Chain ID: 10
Currency Symbol: ETH
Block Explorer URL: https://optimistic.etherscan.io
Add Arbitrum by entering the following information into the fields and then selecting "save":
Network Name: Arbitrum One
New RPC URL: https://arb1.arbitrum.io/rpc
Chain ID: 42161
Currency Symbol: AETH
Block Explorer URL: https://arbiscan.io