Modi (and other Indian PMs) are not directly elected, so I feel they would not count. People vote for individual members, and the cumulative result of those individual member elections dictates who becomes PM. Modi himself was only elected by around 675,000 voters in Varanasi.
(Technically speaking, the electoral college system means that the US presidential election is also indirect - but in practice, it is treated like a direct election for specific candidates, so I think it's reasonable to call it one for our purposes.)
Depending on how you count it, the answer is either 113 million people in the USSR, 1991, or 85 million people in Indonesia, 2019.
The probable answer in a modern democratic election is the candidates in Indonesian presidential elections. Since 2004, these are a direct vote across the entire country, which I believe makes them the largest direct elections for a single post. Putting them in the context of US presidential votes, these are all the cases I know of with over 70 million direct votes; numbers from WP.
- 85,607,362 votes for Joko Widodo (& Ma'ruf Amin as VP) - winner, 2019 Indonesian general election
- approx. 80,000,000 votes for Joe Biden (& Kamala Harris as VP) - winner, 2020 United States presidential election
- approx. 74,000,000 votes for Donald Trump (& Mike Pence as VP) - loser, 2020 United States presidential election
- 73,874,562 votes for Susilo Bambang Yudhoyono (& Boediono as VP) - winner, 2009 Indonesian presidential election
- 70,997,833 votes for Joko Widodo (& Jusuf Kalla as VP) - winner, 2014 Indonesian presidential election
A number of other Indonesian and US elections have had winners and losers in the 60-70m range. Brazilian presidential elections are probably third behind these two, with winners in recent years getting between 50-58m votes. (Edit: as StuartF notes, recent Russian presidential elections are also in this range, with the winner getting 56m votes in 2018 and 52m in 2008.)
Referenda, a vote on a question not a candidate, are a bit more complicated. In March 1991, a referendum was held on the future of the USSR. The results had 113 million people voting in favour of continuing the Union in a reformed structure, but it is not clear to me how free this vote was, which probably affects whether or not you would wish to count it.
After that, the biggest conventional referendum was the 2005 Brazilian referendum on gun ownership, with just over 59 million people voting "no" to prohibition. The second is probably the 2020 constitutional referendum in Russia, which had just under 58m people voting in support.