niche guest posts usually perform better because the context matches the topic of your site. when the surrounding content, audience, and keywords are all related, the link tends to pass stronger relevance signals.
general guest posts can still help, especially if the site has real traffic or strong authority, but the impact is often weaker if the topic is unrelated.
in practice a mix works best. a few solid niche placements for relevance, combined with other diversified backlinks, keeps the link profile looking natural and supports rankings more consistently than relying on only one type.