I was tuning with a tuner and the E string was D# so I turned it and then it snapped. Did i tune bad or is there a problem? Please help I’m worried because it was a new violin :(
Since violin e-strings are cheap and inevitably prone to snapping, due to their thinness and high tension, I wouldn't think to much of it. Replace the string, and hopefully the new one will last longer. Just make sure you approach the target pitch carefully. I suspect you turned it up a bit too far – with friction pegs it can easily happen. If that's how you did it. If you have a fine tuner on that string, make sure to fully utilise it: first turn down the fine tuner entirely. Then tune up the string only to D♯ with the friction peg. Finally tune it to E using only the fine tuner.
It is also possible that the reason for the snapping is something to do with the violin itself, concretely with either the bridge or the nut. If there are sharp corners, the string may stick and/or overly strong bend, both may cause damage. However this is usually more of an issue for the lower strings – for a violin E-string, I'd expect that it slips over any corner or just blunts it down through pressure.
I check the notches on my cello's bridge whenever I'm replacing strings. If if feels like a scratchy edge (test with fingernail) file down (just a tiny little bit) with a nail-file. Then dry-lubricate the notch with graphite (i.e., push a freshly-sharpened pencil in the notch and turn it a few times).
One last thing to ensure is that you're actually aiming for the correct pitch. Electronic tuners can be a bit deceptive – sometimes they trigger onto a pitch that's not actually sounding, like a fourth lower than the one you're actually playing. If the string was already at G♯5, then it was bound to break! Theoretically you could also have had it already tuned almost an octave too high and the tuner would not indicate the octave, barely the pitch class... but there's no way you would get the string anywhere near D♯6 without it already breaking before, so this doesn't apply.