Be practical.
Of course you should always avoid cloud but it so happens that there are occasions where you do hit it and it all happens very very quickly.
Full power climb combined with a 180 turn for a PPL without IMC is a recipe for disaster, you loose all sense of balance with the power and 'you are seconds from disaster'. In my early days I was very lucky and many others will admit to the same experience.
Turn by all means and use your compas as a reference not your judgement. Dont alter power settings if you are a basic PPL.
The answer is to fly with a good appreciation of what is around you - even if you don't see the cloud you should be aware from the chart that
you are flying towards a hazard and you should give it a wide berth. You shouldn't have plogged near it in the first place!