If you're just trying to add styles to a JavaScript variable you can't do that, and I don't understand what you would hope to achieve by doing that.
I am therefore going to assume you want to add styles to an html element that you have extracted as a JavaScript variable like so
let msgElement = document.getElementById('msg')
let msg = "OK"
msgElement.innerHTML = msg
In this case, you can add styles to the element like so
msgElement.style.color = "red"
msgElement.style.border = "2px solid red"
In your example, when you change the value of msg to "Conflict", you are doing just that - changing it. You can't have two separate values held by the same variable.
As one of the comments says, this is basic web development, so I would advise some further reading, or an online course such as those provided by Codeacademy
var msg = "OK"it means that the variablemsg, in your computer's memory somewhere, holds the value"OK". Nothing else. It has no concept of color or size or psychology or anything. It's just a value. But you can write this value to your HTML document, like in a<div>or something, and then use CSS to style that div and give it a color and a size. This is day 1, hour 1 of web development, I suggest you take some very basic tutorial :)