You've got 3 cables (grounds are ignored in this explanation and should all be connected together and to the new receptacle):
- Incoming power - Black/White
- Ongoing power (to another light or receptacle) - Black/White
- 2nd Switch - Black/Red/White
The confusing part is that the Black of the switch cable is not currently used. That's because traditional 3-way switches need 3 wires - two travelers plus either hot or switched hot - but you now have smart switches (likely not there originally) which only use one traveler and use that traveler as the hot wire as well.
There are some more complications - e.g., how is neutral getting to the fixture. But since everything else is working, adding a receptacle at this location should be very straightforward. (Adding a receptacle at the other switch would be more complicated). You don't even need to figure out which cable is incoming power!
Wire up the new receptacle as follows:
- Hot = Add to the existing black bundle.
- Neutral = Add to the existing white bundle.
- Ground = Add to the existing grounds.
Depending on what wire nuts were used and what condition they are in, replacing with new appropriately sized wire nuts (each color can handle different numbers of each size of wire) may be a good idea.
Don't connect to the Red - even though that happens to be hot right now, because (a) you need to match your hot & neutral wires to the same cable and (b) if the 3-way switches are ever switched (pun intended) back to regular switches then that red wire will become a true traveler again - only on 1/2 the time.