Always start by choosing your primary color which is the color that is displayed most frequently across your products. You should choose the right color to reflect the tone of your product. Color psychology plays an important role as well. So, when you're in-between colors, check how those colors affect our emotions. Don' forget that colors can have cultural meanings too.
Now that you have your primary color, it is time to choose your accent color. A complementary color can also work as an accent color. Play with colors and see which one suits you best. There are no right or wrong answers. For UI projects, provide two accent colors to make sure it looks good in both light and dark modes.
Don't forget about the secondary colors! Pick your colors to raise brand awareness.