Distinguishing "docker-compose up" and "docker-compose run" from within the container

Hello,
I have stumbled upon my own private container, which behaves differently if I run with docker-compose up vs. docker-compose run. More specifically, it outputs different amounts of console text.

Some type of text has been omitted when run with docker-compose up.
I used the exact command for both cases. I also inspected the environment variables and found no difference out of the ordinary. I also inspect the symlink of /dev/stdout and found nothing unusual.

The thing is, the code is not mine, and I have no idea where to start digging. The container was derived from the ruby:3 image.

There are 2 possibilities
A) There are some differences in the container when runs with different commands.
B) docker/docker-compose handles STDOUT differently between two commands.

Since the output text is selective, I’d guess it is not B. To elaborate on that, if it is about the STDOUT handling of docker, the text should be absent entirely, not at a specific channel or specific type of text.
(But I am not sure about that.)

Does anybody have a clue what might be the difference between docker-compose up and docker-compose run?