I erased data in my My passport ultra before setting it up

I accidentally erased data in my My passport ultra before setting it up.My mac can’t recognize the drive,what should I do

It depends on what you would like to do.

If you wish to use your unit, then formatting the hard drive within Disk Utility should allow it to work as intended:

If you wish to recover deleted files, then you’ll need to browse online for a data recovery program. You could also contact a professional data recovery service company.