services:
s1:
image: nginx
s2:
image: nginx
s3:
image: nginx
docker compose up --no-attach s2
or
docker compose up --attach s1 --attach s3
At least it works with Compose v2.
PS.: Please use code blocks for code snippets instead of quotes so the forum keeps the indentation. More info: How to format your forum posts
Edit:
I incorrectly wrote that it worked with Compose v1. I meant Compose v2 so I fixed my comment.