The act of making a wish conveys fervent hopes for something novel or different to occur in the future, and none of our wishes for the present or the past will ever come true.
I wish= If only
The structures of WISH are:
1. I wish/If only + S+ would +verb1 + Object
This structure is applied while writing or speaking thinking that or in the sense of someone will come and help, but nobody will help or solve the case.
I wish my friends would come to this dense jungle to help me.
If only the police would stop the infamous activities completely in Kathmandu.
2. I wish/If only + S+ could +verb1 + Object
This structure is applied while writing or speaking thinking that or in the sense that the speaker or doer himself or herself wants to do or solve the problems but nothing will happen.
I wish I could open the door. (Here I'm dwarf so I try but can't make it open)
If only I could buy a Lamborghini. (It means I could not afford)
Regrets
We regret the actions we took as a result of our blunders, and to express our sorrow, or lamentation.
1. I wish/If only + subject + had +v3+ object.
I wish I had studied Science. (It means I didn't study science)
If we wish about past possessions or past ability/permission/opportunity
2. I wish/ If only + subject + could + have + v3
I wish I could have gone abroad. (It means I didn't go there which makes or made me lament)