For a narrower profile, go with a slim electric fireplace. These are generally wall mounted but don’t require recessing to get that minimal profile. Available in various widths, each has a slim profile of less than five inches.
The slimmest electric fireplaces come in at about four inches deep. They include all the perks of a regular electric fireplace but in a narrower profile. They can heat over 400 square feet and can be plugged in or hardwired.
Most models need anywhere from four to 12 inches of depth. If you desire a narrower profile, look at a model that can be recessed. These allow you to bring the fireplace flush with the wall for a zero profile installation. Gain an understanding of how much room is available in your wall before you select your electric fireplace.