Read this support article about what you should do with your account when changing residence to a new country Change your Apple Account country or region - Apple Support
This is what Apple actually says about payment:
"Have a valid payment method ready: You might need to enter a valid payment method for your new country or region. If you don’t want to enter a payment method, wait until you're physically in your new country or region. Then create a new Apple Account." Apple does not say what it means by "valid". That is simply all that Apple says, though you will see many posts on this forum with personal interpretations of what they think Apple means.
For Uganda Apple says it accepts "Most credit and debit cards". It does not say it has to be a Ugandan card, but if your card is not being accepted then you will need to find one that is, which may well be one consistent with you now being a resident of Uganda.