I'm fooling around with notation software that will label chords. I input a D major chord, and it offers to also label it also as F# m/5+. F# minor but then /5+?
That reads to me as a F#m with an augmented 5th. The notes of a simple tonic triad of D would be D F# A. Meanwhile an F#m would be F# A C#. If you augment that C# to a D and take the second inversion of the chord then you again get D F# A.
The actual reason you would write it like this would really depend on what you are doing musically in the piece more widely. If you were going F#m -> Bm through D as a passing chord, you could consider it as an F#m aug5, however this kinda would make more sense if the other parts of the piece implied that chord to be an F# chord.
In general don't worry about it too much as often you don't really mean the alternative representations that it suggests, but there is some fun music theory underlying this.
As mentioned by foggy, jazz harmony (which I frankly suck at) or counterpoint are both the things which will give a formal understanding of this sort of thing.
That said I picked up a lot of it more from playing regularly with people who are much better than me at music. In the end if you immerse yourself in music that uses these ideas more regularly you start encountering strange chord notations and seeing patterns in why they are as they are. Finally it isn't really a prescriptive thing, there will always be many ways to write the same chord, and it will usually be much of a muchness what is written vs what you actually play.
In the case above I'd probably always write it as a D because for someone trying to learn it quickly they'll know what a D is more instinctively than a weird augmented minor.