Hi Fred,
Your instincts were good on this one; replacing the battery is where I would have started too. However, given that didn't help, let's see if we can puzzle out your next step.
If the phone powers on only with the charging cord but the battery is new, then I would suspect something in the charging circuit. That's usually a function of the motherboard on most phones, but yours has a daughter card that holds the charging circuitry and the USB-C port. I would look at that as the next suspect; in addition there's a flex cable connecting that daughter card to the motherboard that could be a possibility, but I'd personally try the daughter card next.
Sorry to say iFixit doesn't have a guide to that repair for you, but there's a Spanish site that has just what you need. It is, of course, written in Spanish, but if you use the Chrome browser's translation feature, it is quite easy to use and well done.
Manuales / Huawei P Smart (2019) / Auxiliary plate - Nadie Me Llama Gallina
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
2