Set phrases with the words "time" and "end" can have a different meaning depending on the preposition.
On time & in time
on time = punctually, at the right time, exactly according to the schedule or the arrangement
The bus arrived on time. = according to the schedule
We arranged to meet at 4:30 p.m. I arrived at 4:30 sharp. I was on time. = according to our arrangement
The meeting began on time, despite the fact that not everyone had arrived. = according to the scheduled time
to be on time ≠ to be late
Harry isn't very punctual. He is often late. Brenda is a punctual person. She is always on time.
in time (for something/to do something), just in time = soon enough, not too late. We don't mean an exact time on the clock.
I sent a Christmas card to my friend in Germany. I hope it arrives in time. = around Christmas but not too late
I usually get home in time to watch my favourite TV show. = around the time when the show starts
Come along! You're just in time for dinner. = we are just about to have dinner
We were just in time to catch the 5:20 train. = we were almost late but we caught it still
I came in time to check my coat into the cloakroom and take my seat. = I had just enough time to check my coat into the cloakroom and take my seat
At the end & in the end
at the end of some period of time, a physical or an abstract object, a place, an event etc.
at the end of February
at the end of summer
at the end of the year
at the end of the story
at the end of the meeting
at the end of ≠ at the beginning of
at the beginning of the week
at the beginning of the film
in the end = finally, eventually
Everything was settled in the end.
I decided not to purchase that stock in the end.
In the end, he gave up and asked for help.
in the end ≠ at first
At first, I was bored but I got very interested in the end.