This. And I recently found out you can also use includes
in compose v2.20+, so if your stack complexity demands it, you can have a small top-level docker-compose.yml with includes to smaller compose files, per service or any other criteria you want.
https://docs.docker.com/compose/multiple-compose-files/include/
+1
This is a problem a simple spreadsheet is perfectly adequate for.