GameObject.Find("String") cannot be accessed with an instance reference

how do i fix this?
[Uploading: Screenshot 2023-08-12 114032.png…](
Code:
public void SwordBlock() {

    IsBlocking = true;
    CanBlock = false;
    transform.gameObject.Find("PlayerCapsule").tag = "Blocking";
    Animator anim = Sword.GetComponent<Animator>();
    anim.SetTrigger("Block");
    transform.gameObject.Find("PlayerCapsule").tag = "Untagged";
}

the screen shot of the error didnt load

GameObject doesn’t have an instantce method Find(). You’re probably looking either for the static method GameObject.Find(), which searches for a GameObject globally or the instance method Transform.Find(), which searches for a child of a transform. Depending on which one you want, use either this:

GameObject.Find("PlayerCapsule").tag

or this:

transform.Find("PlayerCapsule").gameObject.tag