It's possible that the iphone can charge wirelessly but not with a wired charger. The wired charging interface is damaged, you can see whether the charging cable or charging interface is grey or dirty, resulting in poor contact, because this interface is generally not easy to break. However, if the wireless can be charged, it means that there is no problem with charging this piece of hardware.
If the wired charge is full, the wireless charge will not be used.