Hi, @raj a
As Vasil Michev said, using Power Shell is the fastest way to operate with large distribution lists.
Unfortunately, the current Exchange tag is not focused on providing scripting. I'm going to add Power Shell tag for you.
From my personal point of view, I tried to write the following script for your reference.

function Get-DistributionGroupMembers {
param (
[string]$GroupName
)
$Group = Get-DistributionGroup -Identity $GroupName
$Members = Get-DistributionGroupMember -Identity $GroupName
foreach ($Member in $Members) {
if ($Member.RecipientType -eq 'MailUniversalDistributionGroup' -or $Member.RecipientType -eq 'MailUniversalSecurityGroup') {
Get-DistributionGroupMembers -GroupName $Member.Name
} else {
$Member | Select-Object Name, PrimarySmtpAddress
}
}
}
$GroupName = "test1016@****.com"
$Results = Get-DistributionGroupMembers -GroupName $GroupName
$Results | Export-Csv -Path "C:\users\DistributionListMembers.csv" -NoTypeInformation



There is a similar case here for your reference. exchange online : Export list of nested distribution group members in entire forest via powershell in csv format - Microsoft Q&A
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".