In general, bonus actions that apply when you do something specific with your action must take place after that action.
In addition, the feature states that you must use the attack action to attack with "only" a glaive, halberd, quarterstaff, or spear. "Only" is pretty clear.
So you must use the Attack action to attack with a polearm for all the attacks you get with your attack action. So if you have Extra Attack, for example, and can attack twice per Attack action, you must make both attacks with your polearm. Only afterwards can you use your bonus action to make the Polearm Master attack.
You ask about making "another attack in between the first attack action," and I think that represents you being confused about how there's normally one Attack action with multiple attacks as part of that action if you have the Extra Attack feature. However, you might be asking about e.g. being under the effects of haste, when you can take two Attack actions in a turn; could you e.g. take the Attack action (your normal action) with a polearm, use the Polearm Master bonus attack, and then take a hasted Attack action with another weapon? That seems allowed by the rules, but there are no secret rules and nothing states how that edge case would work, so you'd have to ask your DM.