There are a number of places you have to change things, but hter is no inherent reason you can’t change an Author year style into a grouped style, just easier to start with a numbered style because there are fewer changes to make. Also remember that it gets complicated if you cite a reference more than once, because endnote then needs to break it out of the group, so it can be used again later. You also need to make sure that the bibliography is sorted by appearance and not alphabetical I think.
At a minimum, you would have to change, the citation template to use Bibliography number, The layout in bibliogrpahy to have the bibliography number. Sort order of bibliography, the grouped settings in numbered, that CG referred to earlier.