The first thing you need to understand is that business analysis is not a role, it is essentially a set of activities meant to be deployed to fully understand a particular part or all of the business. In a waterfall project based world, these activities are primarily done in the “Requirements Gathering” phase of the project.
In an agile world, the activities of business analysis are still done, just not in a “Requirements” phase. The easiest way to understand this is to follow the journey of a user story.
User stories can come as a broad and more general feature, like the ability to order products. Before it is sprint ready, refinement will probably break this story down to the components needed to actually order something, which can include catalogs, shopping carts, payment methods, which in-turn can might be broken down into smaller components.
If you work in a larger organization, how a catalog finds and organizes products will have dependencies from both the product development and marketing teams. Someone will have to that chase down. Payment methods will have implications on the account receivable that has a bunch of rules and policies. Someone will also have to chase down.
Now, once the team (including you) determines the user stories have been well refined and can be worked on as independent, valuable, but still negotiable features, the work can actually begin. Once that happens, a decision might need to be made on how the final implementation impacts particular stakeholders. Once again, someone needs to go understand the need of the stakeholders to help provide the best possible solution.
Your level as a business analyst today will likely impact how you approach transitioning into an agile team member. A more junior business analyst might elect to continue to do the business analysis activities while sharpening the saw with specialized skills in user experience design, data analysis, etc. While a more senior business analyst might decide they are a better fit as a product owner, as many of the required skills and activities overlap. The final outcome will depend on the composition of the team