If you want to play with friends in Phantasy Star Online 2 New Genesis, you will first need to play through the entire tutorial or prologue.
What this means is you will need to complete every task and mission in both the tutorial and prologue. After this, you will be able to invite players to your party.
To invite a player to your party, hit ESC and then click the communication tab as shown below.
Doing so will open up a large tab where you can see two options, one friend's list, and the other nearby players. You can use either one to invite friends to your list, just click on the friend's list and then select your friend's name by clicking on it and then hit invite to the party.
If you choose the nearby players option, you will see a list of all the players in the range of your character's current position. So if you want to add your friend to your party this way, you will need to find their name, and they will need to be near you and on the same server as you.
Once your friend joins your party, you will be able to help each other level and complete quests and other activities in the game.
For more on Phantasy Star Online 2, check out How to fix the Steam launcher for Phantasy Star Online 2 New Genesis and All weapons in Phantasy Star Online 2: New Genesis