A stink bug turns up on the inside of a closed window. Before you try a scented spray, look at the corners of the screen and the seam where the frame meets the wall. That is where a small repair can help keep the next bug out.

Inspect the screen, frame and door sweep
Press each screen corner into its track and look for tears. Check the trim around the window and any gaps beneath exterior doors. NC State Extension recommends sealing entry points and fixing damaged window screens to keep brown marmorated stink bugs out of the home.
If you keep seeing them upstairs, include accessible openings around siding and utility lines in your check. Replace worn weather stripping or repair loose screens. Keep vents and drainage openings clear. For an attached garage, check the door corners too, as in our garage threshold guide.
Catch the bug you can see
Set a cup over a bug on the sill and slide a piece of stiff paper underneath. That keeps you from crushing it and releasing its odor. If more bugs appear over the winter, they may have entered earlier and sheltered inside the building. Note which room they turn up in and check that area again for gaps when you can inspect from outside.