Get entries whose title has a keyword or related to a category's title
You would have to create the relatedTo condition manually first and then pass it in to the orWhere method. This is untested, but should get you on the right track.

Reference the _applyRelatedToParam() method in the ElementQuery class:
https://github.com/craftcms/cms/blob/3.1.26/src/elements/db/ElementQuery.php#L1724-L1727

$keywordCategory = Category::find()-&gt;title($keyword)-&gt;all();

$parser = new ElementRelationParamParser();
$relatedTo = $parser-&gt;parse($keywordCategory);

$entries = Entry::find()
    -&gt;where(['title' =&gt; $keyword])
    -&gt;orWhere($relatedTo)
    -&gt;all();