It would be helpful if you included a few more observations/comments such as:
>you say 'bought' - was this new or used and has it previously worked whilst in your ownership?
> if you bought new, then are you reasonably able to return to the place of purchase for help
> Are you confident the battery is fully charged and seated fully in the rear rack/carrier?
> does the handlebar display come on and show the battery level?
> have you physically checked that all electrical connectors are made properly?
As above two simple obs, battery charged and display is on.
With pedal assist (PAS) most simple cadence types utilise a BB sensor and a magnet disc behind the chain wheel or sometimes the set up is visible on the LHS.
A lot of sensors have a Red LED it should be lit and blinks as every magnet passes by.
Upturn the bike for easier accessibility or a clamped bike stand.
. Check the Magnet disc is not broken and is attached. If it is on the BB shaft ensure that the disc is firm and can't be rotated around the shaft by hand.
. Adjacent to it, is a wired sensor head again ensure it is undamaged and secure in place. The gap between the sensor and disc should be 1-2mm.
. Check over the sensor wiring for any damage and that it's connection to the metal box controller is correct.
. If still not working it may be possible to test it with a meter, depending on the wire connectors used. With block connectors a simple check takes a couple of minutes to fault find and issue.
If it is a Torque sensing PAS then it could likely be damaged and need replacing or may need taking apart / cleaning the optics.