How to search by title OR tag using Craft CMS?
I think you need to make two separate queries, get two arrays, combine them using the merge method and leave them unique, since these are different searches, textual and by related elements. It's like a quick fix, if I find something I will answer.