You’re using a low-quality charger.
Apple MFi-certified chargers are your best bet. Don’t be tempted to pick up a poor charger from the gas station or local convenience store in an effort to save money. Oftentimes these don’t deliver the appropriate charge, nor do they protect your device against power surges. Check out these MagSafe chargers for your new iPhone 12.