When English nintendo website use “How to Charge the Controller”, In Japanese nintendo website use “コントローラーを充電する”. It has no meaning of “how to”, but this is a popular way. You can use “コントローラーの充電のしかた” too.
When you google “How to become a teacher?“ in Japanese, you should use “先生 なる 方法” or “先生になるには”.
This is an uncommon usage of English infinitive (to + <verb>) known as infinitive of result (as opposed to infinitive of purpose, which is much more common). To translate "only to ～" into Japanese, you usually have to split the clause into two and join them using が, けれど, etc.
I did it again, only to fail.
I searched everywhere, ...
By far the most commonly used expressions would be:
Neither one would be any better than the other.
To introduce a more formal way of saying this, we also say:
With this expression, the grammatical subject is the "problem". It is not the thing/phenomenon/person as in the first two ...
You can say one of the following:
第【だい】19講【こう】 (traditional and stiff)
授業19 (make sense but less common)
19番目の授業 is grammatical but sounds like "the nineteenth lesson" rather than "lesson 19". 学課 usually refers to a 'course' rather than individual lessons.