Some days the walk is not happening. It is pouring, the sidewalk is ice, you are ill, the puppy has not had their shots yet. The dog does not care about any of that. By mid afternoon they are doing laps of the living room and the day is going badly for everyone.
Indoor days are survivable. The trick is that you cannot replace a walk with movement alone, because you do not have the space. You replace it with work for the nose and the head, which takes less room and tires a dog faster than most people expect. The reasoning behind that is in how to tire out a dog.
Scatter feeding, the thirty second version
Take their dinner, throw it across the rug, let them find it. That is the whole activity. A dog eating out of a bowl is done in fifteen seconds. The same food scattered into carpet takes ten or fifteen minutes of concentrated sniffing, and most dogs lie down afterward.
If you have hard floors, use a towel. Lay it flat, sprinkle kibble on it, roll it up loosely. On a snuffle mat it lasts longer again, because the food sinks into the fabric and they have to push through it.

Hide and seek with food, then with you
Shut them in another room, hide five pieces of food around the living room, let them in and say find it. Start easy, in plain sight, so they learn the game. Within a few rounds you can hide things behind chair legs and under the edge of the sofa.
Once they have the idea, hide yourself. Dogs love this far more than it deserves, and it burns energy through excitement rather than distance.
The muffin tin, the box and the towel
Three free puzzles, in order of difficulty. Put treats in a muffin tin and cover each cup with a tennis ball. Put treats in a cardboard box with crumpled paper on top and let them dig, which is messy and worth it. Roll treats inside a towel and let them unroll it.
A cardboard box that arrived that morning is also just a good object. New smell, shreddable, free. Supervise if your dog swallows what they shred.
Five minutes of training beats an hour of nothing
Teaching something new is hard mental work. Pick one small thing, spend five minutes on it, and stop while they are still interested. Spin. Chin on the floor. Go to your mat. Walk backwards. It does not matter what it is. Short sessions, ended early, are what makes a dog want to do it again tomorrow.
Something that moves when you have run out of room
In an apartment you cannot throw a ball, and after four hours indoors that is the thing they actually want. A toy that moves by itself gives you a chase in the space you have, because the toy keeps moving between your throws.
The BorkBall Disco rolls off in its own direction and circles back, which works down a hallway or around a coffee table. If your dog solves a predictable toy in a minute, the gravity ball hops sideways instead of rolling straight and holds attention longer. For a small dog in a small apartment, the smaller version is easier to pick up and carry.
Stairs, if you have them and your dog is built for it
Throwing a toy up a flight of stairs and having your dog fetch it is a genuinely hard workout in a very small footprint. Skip it for puppies whose joints are still growing, for dachshunds and other long backed breeds, and for older dogs with stiff hips. For a healthy adult it is the most efficient indoor exercise there is.

If you live above someone
Apartment living adds a constraint nobody mentions: a dog thundering up and down a hallway at nine at night is a problem for the person underneath you. Nose work solves this neatly, because sniffing is silent. So is a lick mat, a chew, and most training. Save the running for daylight hours and lean on the quiet activities in the evening, which is when dogs tend to get restless anyway.
Rugs help more than you would think. A dog who cannot get traction on a wood floor will skid, which is both loud and hard on their joints. A runner down the hallway makes indoor chasing safer and quieter at the same time.
Do not do all of it
Two or three of these across a day is plenty. A dog who has sniffed out their breakfast, learned something at lunch and had a chase in the afternoon has done more work than they do on an average walk. You are not trying to fill eight hours. You are trying to break up the stretch between them.