Merging bound states in the continuum by harnessing higher-order topological charges