I'm having the same issues since about 1.21.43. Severe lag anywhere near my base, doesn't matter if I'm on Realms, local, xbox, or a computer with a 4090. There used to be a tiny amount of lag around the base, but now it's impossible to get anything out of a chest, open my inventory, open a door, etc...
Edit: I've copied the world, ran /kill @e commands, and flown around in spectator to verify the lag isn't caused by mobs/entities.
The 1.21.51 release just came out, and everything is roughly the same. Chunk loading might be a little better, but I still can't open chests, eat, open my inventory, etc... when my base is in within simulation distance. As I stated in a previous comment there used to be a tiny amount of lag around my base.
I could see the following as culprits if they have increased lag over previous versions:
-Chests: There are over 1500 double chests at my base, and a few hundred barrels.
-Items in chests: Many chests and barrels are packed full of full shulker boxes and most of the other chests are full of items.
-Hoppers: Over 2000 hoppers.
-Beacons: Over 120 beacons (100 decorative, about 20 powered)
-Lighting: Many thousand torches, frog lights, sea lanterns, etc...
-Glass: Doubtful, but there are probably 10's of thousands of glass blocks.
-Item Frames: Over 300.
-Anvils: Over 100 (Anvil wall in enchanting room).
I tested the following:
-/kill @e repeatedly around the base - no change
-Removed about a quarter of the chests, hoppers and items in the chests - helpful, but still not playable.
-Downloading the world from Realms and running it locally on a very beefy rig with a 4090 - no change.
-Removed a few hundred sponges and the water that was falling on them (dry biome, so the sponges stayed dry) - Small improvement, no where near playable.