In general, Part A covers:
Inpatient care in a hospital
Skilled nursing facility care
Inpatient care in a skilled nursing facility (not custodial or long-term care)
Hospice care
Home health care
Part B covers 2 types of services
Medically necessary services: Services or supplies that are needed to diagnose or treat your medical condition and that meet accepted standards of medical practice.
Preventive services: Health care to prevent illness (like the flu) or detect it at an early stage, when treatment is most likely to work best.
You pay nothing for most preventive services if you get the services from a health care provider who accepts assignment.
Part B covers things like:
Clinical research
Ambulance services
Durable medical equipment (DME)
Mental health
Inpatient
Outpatient
Partial hospitalization
Getting a second opinion before surgery
Limited outpatient prescription drugs
https://www.medicare.gov/what-medicare-covers/what-part-a-covers
https://www.medicare.gov/what-medicare-covers/what-part-b-covers