Well “Quartet” as such isn’t particularly useful - that’d include a string quartet and a saxophone quartet and a piano quartet for example, which have little in common other than happening to be four people. String Quartet and the like could be useful though.
It’s generally not about the number but the composition - a string trio and a piano trio are very different types of ensembles even if they both have three people, but most piano trios will be piano, violin, cello and could be classified together.
I’m not fully convinced about “ensemble” because… well, what’s the big difference from “group”? It just means “a bunch of people” really