¿Cómo estás? I speak Spanish but I will write in English so others are able to understand. I am a gringo who has lived in Chile for the past 12 years. My wife is Chilena and has a large and very old family with several ines going back to Spain. I understand your problem - I am currently dealing ith the same issue when attempting to enter her ancestors (and those of my children) into Wikitree.
I have found that the correct method is to enter both last names into the last name field. Wikitree needs to see both of these last names as a single name. Although this is counter intuitive, I've found that it actually works well. Your ancestors, cousins, children, etc. will be linked to you irrespective of how you spell their last name so long as you enter their profiles into the system correctly. Your father, grandfather and so on, will show up in the tree as such, if their profile links them to you with this relationship.
When you want to search Wikitree for possible relationships to your tree, this becomes a little more complicated. For instance, if you want to search for profiles that includes 'Diaz' as one of their last names, Wikitree need to know that you need to find not just 'Diaz' but also 'Diaz Sanchez', 'Gonzales Diaz', 'Diaz Arbizu' etc. You can do this by entering an asterick wildcard * after the name. Entering 'Diaz*' will bring up all last names that include Diaz.
The only slightly irritating problem is that in an effort to be helpful, Wikitree will automatically enter the last name of children to be identical as the fathers. To correct this, you´ll have to change the each childs last name manually when their profile is created.
Hope this helps.