Add Tags to a Newly Created Entry With PHP in Craft 3
Tags are normal Elements like Entries, Categories, Users and so on.. In order to relate a Tag to another element, you need to insert the array of those elements like you are used to with every other field

$existingTag = Tag::find()-&gt;title('whatever')-&gt;one();

$tag = new Tag();
$tag-&gt;groupId = 1; //&lt;-- insert your group id here
$tag-&gt;title = "something";
Craft::$app-&gt;getElements()-&gt;saveElement($tag);

$entry-&gt;setFieldValues([
   'tags' =&gt; [$tag-&gt;id, $existingTag-&gt;id]
]);