The risk of contracting coronavirus (COVID-19) from a drive-thru or from carryout is much less than if you were eating in a restaurant. COVID-19 is spread from one person to another through talking and respiratory droplets. The risk of catching COVID-19 from food containers like cardboard boxes and bags is exceptionally low.
If you are eating at a restaurant, try to eat outdoors where we know transmission of coronavirus is less likely. If you are eating inside a restaurant, make sure the restaurant staff and particularly the servers and people you interact with are wearing masks, because that will help protect you from contracting it if those individuals are spreading the virus.
The Centers for Disease Control and Prevention outlines steps you can take before and during a trip to a restaurant to help protect yourself from COVID-19.