I had a similar situation with a camera in my hallway - the signal kept dropping, especially when someone walked between rooms. Usually it's a combo of several factors: walls weaken the WiFi signal, the camera might be more sensitive than other devices, or it just reconnects when the signal drops below a critical level.
First, try restarting the router itself (just unplug it for about five minutes), then move the camera closer to it for a couple of days and see if it disconnects as often. If the problem goes away - it's distance and interference from walls, and you need to find ways to improve coverage (move the router higher, remove obstacles, or even consider a second router if your apartment is large). If the camera keeps disconnecting even right next to the router, then it's the device itself - could be a faulty firmware, overheating, or power supply issues.
Also check in the camera's app whether power consumption requirements are too high (sometimes cheap models are unstable). Also look in the router settings to see if it didn't block the camera (weird thing, but it happens) and whether there's enough open space in the next room between the router and the camera.