Welcome, Reshma Bremond.
In the end = finally, after a long time; e.g., In the end, I got a visa for Russia.
At the end = at the point where something stops; e.g., I think the film’s a bit weak at the end.
on time in time in the end at the end prepositions grammar
All the best.