"Magic items are not necessary," is kind of a confused idea in the community. Somehow it got interpreted my some people as "you should not give out magic items."
Magic items are necessary. They're one of the most important player rewards in the game. They're in-universe, tangible, often unique rewards that can include directly relevant narrative elements. They can be hooks. They can be MacGuffins. They can be campaign lynchpins. DMs are 100% expected to give out magic items in essentially every campaign. They are both too much fun and too much in line with the fiction of fantasy settings to not have magic items.
Magic items are only "not necessary" in the sense that there aren't really any creatures that say, "You must have +2 magic weapons or greater to be able to damage this creature." There aren't any creatures that say, "DR 50/+5". The designers didn't take the Proficiency Bonus off the class progression chart, split it in half, and then stick the other half of the bonus on attribute-enhancing magic items that you have to go out and find. Monsters don't have such overwhelming attack bonuses that, without magical armor bonuses, a character in full plate and shield would still be hit by 85% of attacks. Those are the designs from prior editions that made magic items necessary in those editions. The mechanics of the game in-and-of themselves demanded and required that players have magical gear in order to participate in the game at a very basic level.
Instead, in 5e when you're a level 20 Fighter and you pick up a +1 longsword, you are benefiting from a magic item reward. You are better than the design of the game assumes you are capable of achieving even by having the lowliest items in the game. That doesn't mean you should only give out +1 longsword. It means the reward you earned at level 5 is still able to benefit you in real mechanical ways at level 20. There is no mechanical expiration date on your magic item rewards. They helped you a lot when you go them, and they will be just as helpful for the rest of the game.