No matter what I do, I can't get the tiny screws to reach the motor, meaning that the screws never get tightened and they just fall off (they're simply too short). I tried using the longer screws which kind of works, but this prevents the motor from being tightly held against the black piece. Am I doing something wrong?
Most domestic and commercial screws made and installed in recent equipment, are metric threads. Some are very small, M1, where M is Metric, 1 is the diameter in millimetres.
The ones in your image are pan head, recessed for either a Phillips or Pozidriver screwdriver. The Chinese tend to use Phillips.
Pan and Cheesehead screws are measured on the threaded length, Countersunk on the total length.
Larger sizes, M8 upwards come in different pitches where pitch is the distance between the thread crests. These are referred to as Coarse and Fine threads.
You have to be careful in your example. Yes, too short, won't hold. Too long and you might hit something critical.
If you are into screws, a vernier calliper and thread gauge are useful.
Money saving tip. Harvest screws from items and equipment due to be chucked out.