How to add a group of or_where conditions to the query which already has some where closes

Found two similar topics on this forum:

That’s where the dynamics were presented by Ecto. But I can’t figure out how to apply them to my case.