We struggled in the beginning, but learned quickly.
最初に苦労したが、すぐに習得した。
物事が始まった時点やその直後の時期を示す表現
At or during the earliest part of an event or period; at the start.
in the beginningは、中英語で in(〜の中で)+ the beginning(始まり)が結び付き、時間の起点を示す語順の定型表現として定着した