how can I get only the SQL server logins, when we use Export-dbalogin
As you can see from the Get-DbaLogin source, the -Type parameter accepts a value of 'SQL' to filter to only SQL Logins and exclude AD logins. You can pipe this directly into the Export-DbaLogin function like so...

Get-DbaLogin `
    -Type 'SQL' `
    -SqlInstance localhost | 
Export-DbaLogin `
    -FilePath 'foo.sql'




Note that some logins are excluded by default as shown in the warning feed.