When I was a naïve young person we did something similar, paying a bit for our track to be on a CD. I've no illusions now, but I still joke I'm a published musician.
And there are still plenty of ways to become an author if you want. I have a guilty pleasure of LitRPG books, which are generally terrible and riddled with problem authors, but there's a cadre of writers who are making good money.
They write in a serialized format like Dickens used to. Chapter by chapter, release it for free on RoyalRoad, get traction. Then they package a book up for Kindle Unlimited, take the old chapters off RR apart from some taster chapters, and start a Patreon for advanced access to new chapters.
There's one series which is absolute trash, Defiance of the Fall, where he's admitted he's dragging the story out as he's making so much money.
These fake agencies obviously give no advance, then push you to buy services related to supposed publishing of your book. 5k this, 10k for that, we're almost ready, just another 15k for xyz and we'll totally pay you that 350k for you book!
As such it is actually easy to catch out the scammer.