More than focussing on color,you should focus on making it distinctive enough through contrast. Using color alone as an indicator would make it inaccessible for people with color blindness. To quote the W3 guidelines
If color alone is used to convey information, people who cannot
differentiate between certain colors and users with devices that have
non-color or non-visual displays will not receive the information.
When foreground and background colors are too close to the same hue,
they may not provide sufficient contrast when viewed using monochrome
displays or by people with different types of color deficits.
You could use red or green as long as the contrast is strong enough for people to read it and make it out without relying on color.
For example, taking facebook as an example
What a person without color blindness sees
Here is what a person with Monochromatic vision sees
Taking twitter Notifications as an example
Here is what a person without colorblindness sees
Here is what a person with monochromatic vision sees
So you could potentially use any color as long as it stands out and the contrast is good. Here are some examples