You can do either – it depends on how you create your model. Trainer just handles the training aspect, not the model initialization.
# Model randomly initialized (starting from scratch)
config = AutoConfig.for_model("distilbert")
# Update config if you'd like
# config.update({"param": value})
model = AutoModelForMaskedLM.from_config(config)

# Model from a pre-trained checkpoint
model = AutoModelForMaskedLM.from_pretrained("distilbert-base-cased")

# Put model in Trainer
trainer = Trainer(model=model)

Unless you have a huge amount of data that is very different than what pre-trained models were trained on, I wouldn’t recommend starting from scratch.
Start from scratch when you are creating a model for a niche domain like a low-resource language.
Start from a pre-trained model if your text is in a high-resource language (like English) but the jargon might be very specific (like scientific texts).  There are enough fundamental similarities that you’ll save compute and time by starting from a pre-trained model.