Your vacuum cleaner is designed to agitate the fibres of your carpet and then suck the dirt and debris up into your bag. There are a few reasons after time that the performance of your vacuum cleaner can deteriorate i will try and explain a few for you. Before doing anything to your cleaner disconnect it from the mains supply.
Your vacuum cleaner belt can wear and stretch over time and not turn the brushroll or brushbar well enough to agitate your carpet and losen the debris in the carpet to suck it up, you can easily check by turning your vacuum cleaner over and look at the brushroll, you may even be able to see the belt it may be loose or have in certain cases snapped, if you cannot see the belt you may have to remove a few screws that hold the baseplate onto the bottom of the cleaner, then you will be able to inspect the belt for tightness around the motor and to the brushroll, its a good idea aswell to remove any hair and cotton that may have wrapped around the brushroll over time, if you decide at this time the belt has worn then replacing it is quite staright forward at this stage.
Its also a good idea to check your vacuum cleaner bag isn’t full as this can cause loss of suction as air needs to pass through the bag and deposit the dirt and dust inside the bag, so a full bag will restrict the flow of air needed to maintain good suction.
Another reason for loss of suction could be a blocked hose, to check this remove the hose from the vacuum cleaner, you may see a blockage at either end of the hose that you can remove with your fingers, if you cannot reach it you could always use a brush handle or similar long pole to force the blockage out, if there is no blockage check the hose for any splits or holes, as this will greatly reduce the suction needed for your cleaner to operate efficiently.
Your vacuum cleaner is probably fitted with filters, these can become dirty and blocked over time, they should be removed and cleaned, if your particular cleaners handbook says you can clean them or they may need replacing, blocked filters will greatly reduce the efficiency of your cleaner.
Lastly the motor on your cleaner may be worn and need replacing, or just the carbon brushes may need replacing, cost of motors vary from manufacturer so its worth checking the price and gauging whether it might be more cost effective to buy a new vacuum cleaner.