I have difficulties understanding why $ P \implies Q$ is equivalent to P only if Q. I do understand that in the statement "P only if Q", it means if $ \lnot Q \implies \lnot P$".
Regarding this example, Equivalence of $a \rightarrow b$ and $\lnot a \vee b$
If I win the lottery, then I will give you \$1 billion. This statement has the form $P \implies Q$.
But saying P only if Q, means "I win the lottery only if I give you $1 billion" doesn't sound so right. Is there anything I'm missing here?
$P$ only if $Q$ means that when $Q$ is false, then $P$ is false, i.e., ~$Q \implies$ ~$P$.
But the statement of ~$Q \implies$ ~$P$ is equivalent to the statement $P \implies Q$. Specifically, the former is the contrapositive of the latter.
Applying this to the example you gave:
"I win the lottery only if I give you \$1 billion" is equivalent to "if I don't give you \$1 billion, then I won't win the lottery", and the latter statement is the contrapositive to "if I win the lottery, then I will give you \$1 billion."
If you have doubts about why the contrapositive of a statement is an equivalent statement, have you tried making a truth table?