Here's how that works in the real world.
Option 1: Use a Wall-Wart that is already UL-listed.
You design the DC side of the product, and pack it off to UnderWriter's Laboratories to be tested, along with some of the wall-warts. UL sees the wall-warts are already UL listed, and makes no further investigation. They focus on the low voltage behavior of your equipment. It's more than a formality, but it's not crushing since you use RU listed components. It goes fairly quick, and it's not terribly expensive.
It's also fast, and only a few people are involved, which helps with trade-secret stuff/leakage to competitors/press.
Then you want to revise the product. This voids the UL listing so it has to go back for another approval cycle. UL asks "Same wall-wart?" You say "Yeah." Not terrible.
Option 2: Integrate the power supply into the entire product.
You design your entire product, soup to nuts, with its integral 120V/230V power supply. You pack it off to Underwriter's Laboratories, because you can't sell it in the US without a UL listing.* UL then tears it apart and torture tests everything in it relating to how it interacts with mains power, including all manner of provoking the 120/230V mains power to go places on your board it should not, dunking it in water, yada yada.
They really pull out the stops, with a lot of types of inspection done by a lot of people. It takes awhile, so all these people are product-secrecy risks.
And then they fail you on a bunch of items, mostly related to mains power, (you never figured for people sticking paper clips in the vents), and then you have to rework and redesign, rinse wash repeat. Finally you have your cert and you are shipping.
Then you want to revise the product. That voids the UL listing so you have the mains testing done again.
This is why power bricks/wall warts are so darn popular for manufacturers.
For tinkerers, it means if you stay on your side of the wall-wart, you don't have a particularly big safety concern.
* Unless you a) ship it direct from China, or b) ship it direct from China to a domestic drop-shipper such as Amazon prime/Fulfillment. Either way, you are sneaking it past Customs, who doesn't really have the expertise to inspect for unsafe electrical products (and it's the least of their worries), and you are also making the end-user the importer, which evades responsibility for you. This works great if you are beyond the reach of US or EU regulatory agencies.