Lionel Messi also provided an assist as Inter Miami beat Nashville 3-1 to end a three-game winless run at home