Best place to specify batch size

Hello, I am new to the library and I am not sure what is the best place to specify the batch size. It seems that the batch size should be both specified in the LightningDataModule and in the LightningModule. It seems to me that when calling trainer.fit() the batch size in the LightningDataModule takes precedence over the one specified in the LightningModule. But at this point I am unsure why we would specify the batch size in the LightningModule too.
What are the reasons behind this? And what are the best practices?
Thanks you