How to find appropliate algorithm to bulid a model for natural language based two data
There's no algorithm intended specifically for this task, you need to design the process yourself (like for most tasks btw).
Given that the goal would be to use a person's name as an indication, I'd suggest you represent a name as a vector of characters n-grams in the features.
Example with bigrams ($n=2$):
&quot;Braund&quot; = [ #B, Br, ra, au, un, nd, d# ]

Intuitively the goal is for the model to find the sequences of letters which are more specific to a nationality. You could try with unigrams, bigrams or trigrams (the higher $n$, the more data you need for training).
Once the names are represented as features this way, you can train any type of supervised model, for example Decision Tree or Naive Bayes.