I don't know where they came from because I am sure I didn't generated that many addresses.
Those addresses are all generated from your seed phrase.
Note that electrum generating those addresses doesn't mean you generated them before. You can import any other seed phrase into electrum, and it can derive a very large number of addresses from it.
Locate the last transaction and copy the addres.. goto the console tab and type ;
wallet.get_address_index("the last txn address you copied ")
That should give you the index as the second value , copy it and extend the gap limit upto the index you copied.
This won't help.
That command gives you the address index, only if it has already been generated by electrum.
Pretty bad; it seems that it is deeper than 100k addresses.
I highly doubt OP generated such a large number of addresses.
If OP increased the gap limit to 10,000, but the address he is looking for still hasn't been generated, the problem is probably something else, and not the gap limit.
I planned to install Bitcoin core on my computer and set up watch only wallet and check addresses directly but it seems that it is unavailable for download:
Don't waste your time with Bitcoin Core. It won't help you.