The main thing is not to mess up with the age and sex of the new cat. If your cat is already quite old and has always lived alone, a new neighbor might cause stress instead of relieving boredom. But if she's a couple of years old and generally enjoys company (purrs, plays with toys, doesn't hide all the time), then a young cat around her age is a decent chance. By the way, neutered and spayed animals get along easier than intact ones.
But there's a nuance people forget about - you need proper adaptation. You can't just get a second cat and let him loose in the apartment with the first one. They should first get used to each other through the door (for a few days they live separately, smell each other), then make contact through a gap, and only then can you give them access to each other. If you throw them together right away, even animals that would be perfect for each other might start fighting just from the shock.
It's easiest to get a younger cat (around 6-8 months old) rather than an adult. Young cats adapt faster and rarely claim territory. And yes - make sure you actually have enough space, litter boxes (you should have at least two) and time for two cats. If that's doable, it's worth trying.