Use a high-quality, flexible exterior caulk or expanding foam sealant specifically designed for construction and building applications. This will help ensure a durable and weather-resistant seal.