If you’re not staying in Holland and just passing through, you’re exempt from quarantine. You need to state on quarantine declaration from that you’re exempt and have your train ticket that shows you’d be in the country for less than 12 hours.
From the Dutch government website:
Exemptions from mandatory quarantine
Stays of less than 12 hours.
People who will be staying in the Netherlands for less than 12 hours, regardless of the purpose of their stay in the very high-risk area.
Documents required
Quarantine declaration and ticket
Passengers travelling by public transport and other commercial passenger transport must have a ticket showing that they will be staying in the Netherlands for less than 12 hours.