'~' at the start of a filename is the conventional filename abbreviation convention used in say, a shell (e.g., bash) to designate the user's home dir. The actual pathname would not have '~' in it unless something wanted that character explicitly as part of the name.
For example, if you haven't moved your home dir, and your user account (user) is, say, "foo", then a file in "foo", call it, "x", would be located at "/Users/foo/x". You could reference "x" in a terminal shell as "~/x" but that will be processed as "/Users/foo/x".
So, if you are actually seeing a file with an explicit "~' at the start of it (or that's the entire filename) I am assuming someone (and errant application, a misquoted or mistyped terminal command, or even a mistyped save command typed into some application) created it. Odds are pretty good you can toss it.
Heh, you could also try double clicking it to see if it launches some possibly associated application 😀 That might give you an idea of where it came from -- or not!