This is a legitimate request from Ebay and not a scam.
HMRC have instructed Ebay to collect this piece of information from any seller who reaches a certain threshold - either 30 items sold or items to the value of £1740 sold.
They will pass your information to HMRC although, as long as you are selling your own possessions and not making or buying items to sell, you are unlikely to have to pay any tax.
Read the information in the link below.
https://www.ebay.co.uk/help/account/regulatory/sales-reporting/uk-digital-sales-reporting?id=5454
"There are two ways to be fooled. One is to believe what isn't true; the other is to refuse to believe what is true.”
Søren Kierkegaard, Danish philosopher (1813 - 1855)