Since your friend was working within the United States for over 183 days in 2023, he would meet the substantial presence test and would be treated as a US resident for tax purposes.
The IRS uses two tests, the green card test or the substantial presence test, to determine if your friend is considered a US resident or non-resident. If he meets the requirement of either test, he would be considered a resident.
Please see this link for additional information as it relates to each test used by the IRS.