I'm a German student and I will do a semester abroad in Canada (less than 6 months so I will not apply for a student permit, but only an eTA). I want to do weekend trips to the US (overland) at the beginning of the semester and at the end I will take a flight with a stop in the US. I know that I have to fill in a paper at the border to the US when I will enter for my first trip, but do I need something specific for my stopover at the end? Will there be a problem because of a period longer than 90 days between my first (trips) and my last (flight) arrival in the US?
This should not be a problem.
While visting Canada does not reset the clock on a VWP visit to the US, if you reside in Canada it does. Each of your visits to the US will treated separately. Telling the immigration official each time you enter that you are studying in Canada should be enough. Having some evidence of that fact would be a good idea, but a record of only entering the US occasionally also means they won't be concerned.