只有 + [condition],[subject] + 才 + [result]
[subject] + 只有 + [condition] + 才 + [result]
只有…才 says the result depends on one condition: without it, no result. 只有 opens the condition, and 才 goes before the verb of the result, after its subject.
The result half usually has a modal verb after 才 – 能, 会, 可以 – because it describes something that can happen once the condition is met.
只有 always pairs with 才. 只要…就 is the opposite case – the condition is enough, but there may be other ways. Put side by side: