⬢3D printed parts are very precise, however, there still might be a tolerance in the printed part and same goes for the size of the nut.
⬢Therefore it might happen, that the nut won't fit easily in or might be falling out. Let's see, how to fix it:
⬢Nut won't fit in: use a screw with a thread along its entire length (typically: M3x10, M3x18) and screw it from the opposite side of the opening. While tightening the screw, the nut will be pulled in. Remove the screw afterwards.
⬢Nut keeps falling out: Use a piece of tape to fix the nut temporarily in place, as soon as you insert the screw in, you can remove the tape. Using glue isn't recommended as it can partly reach into the thread and you won't be able to tighten the screw properly.
⬢Every time we recommend to use the "screw pulling technique", you will be reminded with Joe's avatar ;)
Parts in the pictures are used as an example.