Here, you can get a hands-on on how to retrieve the current user information in a SharePoint Framework webpart using PnP JS Library.