Insulating around dryer vent
If you do use a spray foam, use a MINIMAL Expanding Foam. If you use the wrong one, the foam may crush the vent and create a hazard or 2.
Or, you can use regular fiberglass batt insulation. It's not that you're really trying to 'insulate' around the duct. It's more like you're trying to keep animals and such out of the house. (If you're insulating, use batt insulation in the joist bay(s) right up against the ribbon board / sill plate.) If your basement is a cold one, consider insulating the duct with 1/2" fiberglass insulation duct wrap. This will help prevent moisture buildup in the duct.
My best to ya and hope this helps.
Jay J -Moderator
PS: God Bless America!