Per the rules of Bonus Action:
You choose when to take a bonus action during your turn, unless the bonus action's timing is specified, and anything that deprives you of your ability to take actions also prevents you from taking a bonus action.
Features like Cunning Action do not have a timing element; they can be used at any time. But the feat shield master contains this line about timing:
If you take the Attack action on your turn, you can use a bonus action to try to shove a creature within 5 feet of you with your shield.
I cannot do the bonus action first (it doesn't work to pinky swear that the character will use the Attack action next). Many melee classes offer some form of "Extra Attack", with language similar to:
Beginning at 5th level, you can attack twice, instead of once, whenever you take the Attack action on your turn.
So my question is, given that my Attack action allows for two attacks, do I need to take both attacks in order to fulfill the requirement of shield master? Or, after one attack, have they "taken the Attack action" and can do a bonus action in between attacks?
This is important for timing.
If the character must use all attacks before considered having taken the Attack action, then they cannot shove a character prone until they have no more attacks in which to take advantage of being next to a prone enemy. Or, can the character attack once (to take the Attack action), then bonus action shove the opponent down, and follow up with a second attack at advantage (opponent is prone)?
The question Shield Master - Can the shield push be taken before an attack? is different as it's trying to perform the shove before any attack. This is about making one attack, THEN perform the shove. The difference is minor, but due to timing/wording, it can make a huge difference.