I only realized how dangerous the situation had been when I got home.
=> Only when I got home DID I REALIZE how dangerous the situation had been.
It wasn’t until last week that the Agriculture Minister admitted defeat.
=> Only last week DID the Agriculture Minister ADMIT defeat.
I understood Hamlet only after seeing it on the stage.
=> Only after seeing Hamlet on the stage DID I UNDERSTAND it.
They didn’t get round to business until they had finished eating.
=> Only after they had finished eating DID they GET ROUND to business.
They had to wait for twelve hours before their flight left.
=> Only after waiting for twelve hours DID their flight LEAVE. (Or, less commonly but grammatically correct: Only after a wait of twelve hours did their flight leave.)
I didn’t realize who he was until later.
=> Only later DID I REALIZE who he was.
The door could not be opened without using force.
=> Only by using force COULD the door BE opened.
I won’t agree until Tom apologizes.
=> Only when Tom apologizes WILL I AGREE.
The only way you can become a good athlete is by training hard every day.
=> Only by training hard every day CAN you BECOME a good athlete.