welcome to the Ranch, almahoom!
Putting control characters into regexes on Linux/Unix command lines can be maddening. More so since the rules change between raw command-line input and scripts, much less between different unix-like systems and shells.
But I found this discussion helpful:
https://stackoverflow.com/questions/45620124/insert-blank-line-before-line-matching-pattern-in-sed
On my Linux system, this particular expression worked like a charm:
where the a blank line gets inserted before the line that contains "happy" in the file named
test.