An application for most Social Security benefits can be completed online, via telephone or at any Social Security Administration office.
Applications for widow(er)/surviving ex-spouse benefits can only be completed on site, in person, at a Social Security Administration office.
More information is available at the following website addresses: https://www.ssa.gov/planners/retire/applying8.html
https://www.ssa.gov/forms/apply-for-benefits.html