Don't use 'on the contrary' unless you're 100% sure you know how to use it.
It CANNOT replace 'However' or 'By contrast' so you should avoid using it - there are plenty of other linking words of contrast, so you don't need to use 'on the contrary'. Learn more about using alternative linking words to make your sentences more complex with the link below.