To/from UK (except to Ireland) has full immigration checks before boarding and minimum check-in times.
West/Central Europe is in the Schengen zone and has no fixed borders although spot checks can be done, there is no pre-boarding formalities and trains can be accessed up until just before departure.
The Eurostar to/ from the UK has airport-style check-in at your origin station (security + both sets of passport checks). Check in closes 30 minutes before departure, but you should aim to arrive at least 60 minutes before departure.
https://www.eurostar.com/us-en/travel-info/your-trip/check-in
All other borders within the Schengen area are pretty much non events. Most of the time, you’ll pass through without even noticing you’ve crossed a border. But there are sometimes passport checks on the train. You don’t need to leave any extra time for this.
If you travel beyond the Schengen area, to the south or east, you should expect border checks. Sometimes done onboard the train, sometimes you have to get off. These checks are generally built into the timetable of the train you’re on, to allow sufficient time. Sometimes on night trains, you give your passport and ticket to the attendant, and the border control happens while you’re asleep!