Charging problems, MacBook Pro (13-inch, 2020, Two Thunderbolt 3 ports) c
Firstly, make sure that you are using the correct charger, and not a lower-rated charger from a different Mac, such as a MacBook Air. If you have another charger, or can borrow one from a friend, it's worth checking whether a different charger works correctly or not. (Or alternatively, see if the charger works ok on another Mac.)
As this is a recent purchase, you should take it to an Apple Store for investigation. I realise that may be difficult at the moment with Covid-19 restrictions. It's likely to be a hardware problem that can't easily be identified or fixed remotely. (I wait to be proved wrong!)