Agents will usually tell their clients not to spend time writing a sequel while the first book is on submission to publishers, because even selling a first book doesn’t mean that a publisher will want to pick up a sequel or subsequent books. Most of the time, if you’re pitching what’s intended to be a series, you would have the first book written and then an outline or brief pitches for subsequent books – but not multiple novels ready to go.
For similar reasons, querying a later book in a series that didn’t sell on the first one is unlikely to attract an agent. We can’t really do anything with a sequel that’s dependent on a first book that isn’t available and/or has been widely shopped and didn’t find a home.
So if you have a project on submission that you intend to be a series, my advice would be to go ahead and write the outline or brief pitches for subsequent books – but don’t write those books while the first is being shopped. Instead, work on a new project. If the first book is picked up, then you have an outline ready to go should a publisher be interested in further books. And if the first book isn’t picked up, at least you’re already working on a new idea that might have better luck!