by

Goodbye to 'By'

By paying more attention to corruption can improve the welfare of a country.
🇮🇩
Yet another Indonesian structure that doesn't translate directly into English!

If you really must begin with 'by' then you need...

By + [name of solution] + comma + subject + verb (+ etc)

By paying more attention to corruption, a government can improve the welfare of a country.

However, native speakers would probably just say "Goodbye to 'By'" and go straight to the solution as the theme in the sentence:

Paying more attention to corruption can improve the welfare of a country.