You can try out the client for free, but upgrading to a fully functional account costs $5, and there isn't really a way around this. This is because you're going to have to spend $5 to get a fully functional Magic Online account.
Now, you're probably wondering why it is almost free-to-play rather than literally free-to-play. It's how you can (almost) free-to-play Magic Online. However, our topic for today isn't how cheap most cards are on Magic Online as compared to paper or even Magic Arena. Lion's Eye Diamond is over $500 in paper and $2 on Magic Online. Cyclonic Rift is $0.10 on Magic Online but $32 in paper. For example, Sylvan Library is $0.02 on Magic Online and $45 in paper. And this includes a lot of really powerful and playable cards, especially Commander staples. While it is true that it's going to cost a lot if you're going to run out and buy an entire top-tier Modern deck with cards like Ragavan, Nimble Pilferer and evoke Elementals, the way the Magic Online economy works is that only a handful of tournament staples (especially Modern and Legacy staples) are expensive, while most of the other cards on Magic Online cost close to nothing or, in some cases, literally nothing. One popular misconception about Magic Online is that it's an extremely expensive way to play Magic.