Copyrights free and automatic, In the Uk trademarks are not expensive, although remember software’s generally pretty hard to patent (if what you mean) and patenting costs with a solicitor are around 5k plus.
If you’ve got a game, lets say a game that can spot visual problems that uses “bob the dog” as a character, someone can pretty easily copy your game and just use different characters/visual assets and there’d be very little you can do about it.
I’ve been told about sending finished software algorithms to yourself in the post and not opening unless it goes to court as proof of you having an idea prior to someone else but just how practical or effective is in real life, I dunno?!
To make it worse if you have to challenge someone on the basis of infringing your patent/IP/Copyright you’d have to take them to court and it can get seriously expensive.