Hi and welcome!
It's done by using Convert → Filename - Tag, in this case with a format string of
%title% - %artist%
Please see Documentation → Import Parts of the Filename to the Tag for a more detailed explanation of the feature and just reply here, if anything remains unclear or does not work as expected.