A stakeholder analysis goes beyond just listing who is involved in your project. For each stakeholder, you examine their interests, expectations, and the influence they can exert. This allows you to determine how closely you need to collaborate with them, how often you communicate, and what information they require. In an Agile context, this analysis helps maintain agility and ensures everyone has the appropriate level of involvement.
A popular way to plot stakeholders is on a 2x2 matrix with ‘power’ and ‘interest’ on the axes:

Besides power and interest, it's useful to briefly note for each stakeholder:
Not everyone wants or can be involved in the same way. Some request detailed reports, others only want highlights, and still others want to actively participate in workshops. By including this in your analysis, you prevent giving too much or too little information to the wrong people.
Just like user personas, you can create 'stakeholder personas':
Stakeholders can change – new managers, reorganizations, or shifts in external stakeholders (for example, if new laws and regulations are introduced). Therefore, in an Agile environment, the stakeholder analysis is a living document. It is advisable to review and adjust it periodically.
With a targeted stakeholder analysis, you can better anticipate the interests and influence of different groups. The Power-Interest matrix provides a clear starting point for setting priorities, while also examining in detail what a stakeholder's needs are regarding communication and involvement. By subsequently noting their interests and potential concerns, you'll know how to engage or persuade them. In a dynamic Agile environment, it's crucial to update this analysis not just once, but continuously, so you always respond to who truly has influence – and who primarily seeks information.