Gaming can be expensive and most of that expense is optional. Several approaches reduce it substantially.
Wait
Games are cheapest a year after release, when they are also patched, complete, and often bundled with their expansions. Buying at launch pays a premium for being early and receives the least finished version.
The exception is multiplayer games where the population matters.
Subscriptions
If you play several games briefly, a library subscription is cheaper than buying. If you play one game for months, it is not. Work out which describes you.
Older hardware
The previous console generation is inexpensive second-hand with an enormous library. A mid-range PC from a few years ago runs the vast majority of games well at reasonable settings.
The push towards the newest hardware is driven by a small number of demanding titles.
Free games worth playing
Several genuinely excellent games are free, funded by cosmetics you can ignore entirely. The category has improved considerably.
Bundles and sales
Charity and platform bundles offer large numbers of games cheaply. The caution is that buying twenty games you will not play is not saving money.
Second-hand
Physical console games retain a resale market. Buying used and selling on afterwards reduces the effective cost substantially.
What to spend on instead
Audio and a comfortable seat, which affect every hour you play and are frequently ignored while people spend on graphics hardware.