Make sure that the camera's power is off.
Unlike with smartphones, the camera's batteries cannot be charged while the camera's power is on, such as during image playback.
Also, if there are multiple USB ports, charging may only be possible from one of them.
For details, refer to your product's manual.
NOTE: If the lamp turns off right after charging has started, there is a possibility that the battery has been fully charged already. Check the battery remaining amount on the camera.