What I understand is that STM is a part of lens, not camera. Canon 3000D or 1500D makes noise while focusing. So if we buy a Canon EF-S STM lens, which is used on 200D, will it be compatible and produce less noise?
All three of those cameras use the EF-S lens mount, so they should work with pretty much any EF-S lens. If the lens in question has an STM auto-focus motor that is noisy, mounting it on a different camera is not likely to change that, since the motor is entirely in-lens - the only role the camera body has is communicating with it via the electronic contacts in the lens-camera interface to tell it what to do.
This might be different if you had a camera with in-body autofocus motor (i.e. some Nikons and other manufacturers), but no Canon EOS model has ever had an in-body autofocus motor.