Chosen Solution

cleaned the phne, changed a new battery but still behaves the same way

What model are you using? It sounds like a boot loop or else the charging port is faulty. If you hold the charger in place at boot does it stay on? If it is a boot loop only way to fix it is to hard reset the phone. All files and contacts will be deleted and if you are using WP10 then it will return to WP8 and you will have to reinstall updates.