You'll need to cut in a 4" round old-work electrical box.
One of these would do what you want .... I saw these at the electrical supply house this morning
https://www.amazon.com/Leviton-9866-BOW-Downlight-Motion-Sensor/dp/B0BGJPG3KH/