Git commands are different for different versions so be sure to check your Git version.

git --version

Clone a repository with submodules using the --recurse-submodules flag. This works for Git version 2.13 or higher.

git clone --recurse-submodules <remote-repo-url>

If the repository has a lot of submodules, then adding the -j8 flag will fetch up to 8 submodules in parallel.

git clone --recurse-submodules -j8 <remote-repo-url>

Alternatively, first clone the repository and then add the submodules. This should work regardless of your Git version.

git clone <remote-repo-url>
git submodule init
git submodule update

Reference: How to clone including submodules