Hi @tanveerzubair
Use a DMM (digital multimeter) and check that there's 20V DC on the output cable plug connector of the charger.
If there is, flex the charger cable directly behind the output cable plug connector and see if the voltage remains steady or comes and goes.
This is just to eliminate a problem with the charger cable as sometimes the wires can fracture inside the cable
If the charger is OK then you need to open the laptop and check if the [https://www.google.com/search?client=firefox-b-d&q=Lenovo+IdeaPad+Flex+5+14ARE05+dc+in+jack|DC-In jack] (examples only) is OK and connected securely to the motherboard etc.
Here's the [https://download.lenovo.com/consumer/mobiles_pub/flex_5_14_15_hmm_202004.pdf|hardware maintenance manual] that will help with this.
If power is getting to the board OK through the DC-In jack you will need to find the schematics for the motherboard to find out what's wrong