Hydraulic disc brake clicks once when I pull the brake lever and the braking force is very bad
First, don't ride the bike if one of the brakes is not working properly. Not working well can change to not working at all and put you in a dangerous situation.
Take the bike back to the store where you bought it, a 2 month old bike with a major brake problem should be fixed under warranty. In any case if you do not have experience diagnosing and repairing hydraulic brakes you should have a professional address this problem.
The problem is likely that the rear brake has lost hydraulic fluid, or perhaps a seal has broken in the lever or caliper.