You are not alone. Stuttering and stammering are two words for the same thing: unwanted repetitive words or parts of words that make talking difficult. About 7 million people throughout the world stutter. The cause is complex, involving one or more of the following factors: Neurology (research is showing a neurological component), genetics (the majority of people who stutter have relatives who do as well), and family dynamics (perfectionist parents are sometimes impatient with childhood slow speech and make kids anxious). The fact that it gets worse for you in more formal situations or with people you don’t know well suggests that there is an anxiety component in your case. Do some research on the internet to find more information.
Regardless of the cause, it can be frustrating and embarrassing to the person who is challenged by it. The good news for you is that you know you are able to speak without stuttering. It goes away when you are with people you know and trust. That fact again suggests that the root of the problem may be social anxiety, not a physical or genetic disorder.
From what I’m reading, you may be able reduce or eliminate stuttering in situations where you feel pressured by practicing speaking slowly and by avoiding words you know trigger it. Since interviews are a particular challenge, it might help if you practiced by role playing with a friend. Using mindfulness exercises before going into stressful situations might also help you relax.
Since it looks like the problem for you is based in anxiety, I encourage you to make some appointments with a therapist to address the anxiety directly. In addition, you might find it helpful to see a speech therapist who can give you specific exercises to help you communicate more clearly. As you gain more confidence, the stammering may fade away.
I wish you well.