The hamburger did not originate in Germany, despite its name. While the exact origins are debated, it is pretty well agreed that it was created in the US sometimes in the late 19th to early 20th century.
The closest connection to germany that some try to make is an entirely different dish that uses ground beef or pork, which is such a loose connection that you might as well say it originated in Egypt as they were the first civilization to make bread.
The problem is that the origin is "hamburger beef steak" which is the beef patty that came from Germany. This was combined with a sandwich to create a "hamburger sandwich". Over time, the sandwich part was dropped and now here we are.
You happened to ask this while I was in a smaller class at my college so I was able to start a "civil discussion" over whether a Sausage McMuffin was a burger.
A burger is ground beef patties between two halves of a bun. Any other meat is a sandwich. The reason is that "burger" is short for "hamburger," which is the term we use for ground beef, so by definition, a burger is beef.
Veggie burgers are in a weird place, because they should be sandwiches, but since they're intended to be a drop-in veggie substitute, we call them burgers. But they're always prefixed with a qualifier, like "veggie burger" or "bean burger."
A hamburger, or simply a burger, is a dish consisting of fillings—usually a patty of ground meat, typically beef—placed inside a sliced bun or bread roll.
Note that "typically" and "always" are of different meanings. I've made sliders with ground pork before, what is a slider if not a small burger?
A burger is a sandwich with a patty made of ground meat. That meat can be beef, pork, turkey, hell, even chicken if that's your sort of thing. And, like you said, veggies.
It's really pretty uncommon to call a chicken sandwich or a sausage breakfast sandwich a "burger." The term comes from the meat inside of it, hamburger, so generally speaking, other fillings will be called a "sandwich" instead of a "burger." I guess you could call those things burgers, but it would be weird.
And no, a "slider" isn't a "small burger" (it can be), it's a sandwich. A burger is also just a sandwich, so calling a specific sandwich a "burger" vs a "slider" means two different things, a "burger" is larger and generally has ground beef (but occasionally veggies or similar), and a "slider" is a small, usually round sandwich.
The story I heard was that it came to America with Russian Jewish immigrants who took transatlantic ocean liners from Hamburg, which is where it got its name from. (The Jewish origins are important as apparently the beef patty we know originated as a way of prepreparing kosher meals for travelling through areas where options were unknown.)