Uganda joined BRICS as a partner, marking its entry as the first East African nation in the prominent alliance which happened as a result of increased tension between the US and Uganda over LGBTQ+ issues.
This started as the United States government responded to Uganda's anti-homosexuality law, by announcing plans to remove Uganda from the African Growth and Opportunity Act (AGOA), a trade program that provides duty-free access to the United States market for certain products.
The decision was made due to what the United States government described as "gross violations of internationally recognized human rights" by the Ugandan government.
So in response Uganda has to look for alternatives to improve their Economic strength which brought BRICKS to the table.
Ugandan President Yoweri Museveni has also publicly criticized the Western Nations, including the US, for imposing economic sanctions on them due to its stance on LGBTQ+.