I think the question you should ask yourself is if these two components are distinct parts of your infrastructure or if they're effectively the same. It's kind of a subjective and abstract question, but ideally you want your software stack broken into logically cohesive portions.
There's also a more practical consideration related to the size of your organization. If you're working with a small organization with one or two teams, it's likely that you'll want to have a more "monolithic" infrastructure. Larger organizations will likely want an infrastructure based more on "microservices" where individual pieces of the pie are broken down into smaller pieces.
I suppose a good general rule of thumb you could use is that the number of projects you have should be on the order of the number of teams you have working on different components of your software stack. In other words, if you have a handful of teams working on a handful of components, you should have a handful of projects. If you have hundreds of teams working on hundreds of components, you should have hundreds of projects.