Presuming BASH:
https://www.gnu.org/software/bash/manual/bash.html#Quoting
Single quotes are much safer/predictable because:
Enclosing characters in single quotes (‘'’) preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash.
Not to say they are always the right choice though.