You have a few options to assign Power BI licenses. Actual license assignment is done within the Office 365 admin center, or via the Azure Active Directory PowerShell cmdlets.
Office 365 Admin Center
You can assign licenses to accounts within the Office 365 admin center. You don’t need to pay for anything to get to the admin center. It is just a management interface for your tenant.
Go to the users section and look at Active Users. Select a user, then select Edit for Product Licenses. You can then turn licenses on from those that are available. If you don’t see the license you were looking for, go back and look at the ways to get the licenses available.
You can bulk assign licenses to users by selecting multiple users within the Office 365 admin center. Then edit Product Licenses.
You can use the Azure Active Directory PowerShell cmdlets to work with users and assign licenses. This post isn’t going to go into detail about how to do that, but understand that it is available for scripting.
Here is an example of how to do license assignment. It isn’t specific to Power BI, but gives you the gist.
How to use Office 365 PowerShell to manage Microsoft Planner licenses