You can only apply for a trademark that you actually use in commerce.
Then, the trademark office will decide if your name is ok. Let's say "Bob's Cars" is applied to. That is not trademarkable as it is too generic! Anyone with the name Bob who owns a car sales floor can accurately call that Bob's Cars. Dog Cake is just as generic and thus not trademarkable. USPTO has in or around 2007, using this vein, denied registering hotels.com, a lawsuit in the federal circuit of appeals was a loss in July 2009: even with .com, it was generic and not allowed as a trademark, it was not distinguishing itself. Similarly, in the appeal of matress.com the court did decide that:
Any term that the relevant public understands to refer to the genus of ‘online retail store services in the field of mattresses, beds and bedding’ is generic.
As such, a company named Bob's Cars is generally owned by Bob and selling cars. That is generic and is understood as Bob selling cars by the public. It can't be specific. Cakes for dogs are Dog Cakes. Any cake for a dog is a Dog Cake. It is just as generic as Bob selling cars.
However, if a brand has managed without protection to become non-generic before applying, then it can apply for a trademark with the whole name, as Booking.com managed to do in 2020 - however that verdict hinges on the fact that the site booking.com managed to become distinct from being 'just a generic retail store service in the field of' booking travel to be its own thing:
A term styled “generic.com” is a generic name for a class of goods
or services only if the term has that meaning to consumers.