I'm no electrician, but this is my understand of how the various codes work together to protect all components of the circuit.
Breakers protect wiring and trip on shorts
The really important thing is your wire gauge matches your circuit breaker. The breaker is designed to protect the wiring, as well cut power in the event of a short. If you violate code by using 14 awg wiring on a 20A circuit, then a draw of 18A will overheat the wiring and be a fire hazard, but still be under the tripping limit of the breaker. By ensuring you use 12 awg wire with 20A circuit breaker, if the wiring is overloaded, then the breaker will trip before the wiring overheats and becomes a fire hazard.
Outlet Pins protect the outlet from overrated device
The amp rating of the outlet and its pin configuration ensure you don't overload a 15A outlet with a 20A device, as the outlet itself could overheat.
The outlet can overheat if overloaded, and so we have standards that specify pin configuration for 20A devices so they cannot be plugged into a 15A outlet. You might have 12awg wire, 20A breaker, 15A outlet, which is fine, unless you somehow forced a 20A device to plugin to the 15A outlet(which would require physically modifying the plug). In which case the breaker would not trip, as the load is within 20A and the wiring would not overheat as it can handle the 20A, but the 15A outlet will be a fire hazard.
To directly answer your question, having two(or more) 15A outlets on a single 20A circuit with 12awg wire(the appropriate size for 20A circuit) is generally safe, and pretty common. A single outlet will not allow more than a 15A device to be plugged in, ensuring the outlet itself is not overloaded. If the total load of all devices across the two outlets exceeds the 20A limit of the circuit, then the breaker will protect the wiring from overheating by tripping.
Generally you don't often fully load an outlet to 15A. Things like TVs and computers will draw between 50W to 400W each. So in typical use case, you might have one outlet drawing 800W which is roughly 7A and another outlet drawing 1200W(roughly 10A), which is 17A load on the wiring within the safety threshold of 20A for the circuit breaker and wiring. Each individual outlet is within its limit of 15A so will not overheat. If you plugged in so many things across all the outlets in the circuit that you exceed 20A(roughly 2400W) then the breaker will trip and protect the wiring.
So this configuration is safe, yet allows some flexibility in outlet usage.
You could also have 14awg wire, 15A circuit breaker(to match the wiring), and multiple 15A outlets. Again, no single outlet can be overloaded due to pin configuration. If the circuit as a whole is overloaded beyond 15A from a combination of devices across the outlets, the wiring could begin overheating, but the circuit breaker will trip. IF you improperly used 20A breaker with 14awg in this scenario, you have a firehazard when the circuit is overloaded.
There is a code that I'm not completely sure of, but to my understanding says you should not use an outlet for circuit continuity. This is why pigtails are used to connect outlets so that the circuit load is not running across the outlet. I speculate the reason for this is because you don't want a 20A load on a circuit to run across a 15A outlet.
So a combination of standards combine to address several dangerous scenarios, and protect all components from becoming fire hazards.
Overloading a 15A outlet with daisy chained strips
The one exception to this is when you daisy chain power strips or things like Christmas lights. This would allow you to combine enough of a load to exceed the 15A outlet rating, while staying within the 20A tripping threshold of the breaker. In this case your outlet can overheat/fail/be a fire hazard. In such a case, it's likely the powerstrip or first xmas light plug will begin to melt at the same time. This is why it's a terrible idea to daisy chain power strips.
The danger of daisy chaining power strips is mitigated by their maximum output amperage, which must match their plug configuration. If you look at power strips(even the cheap ones that are not surge protectors), they always have a rating of maximum amperage output, which is commonly 15A. If you find a few that have a 20A output amperage, then you will also see that they are using a 20A plug configuration to ensure they can only plug into a 20A outlet. I speculate that UL standards require power strips to have a fuse which will trip/fail if the rated output amperage exceeds their rating. This should ensure if you overload a single 15A power strip with devices that total greater than 15A, then the fuse will fail and prevent the 15A outlet from being overloaded. You would think this would protect a chaining scenario since the root power strip should trip if overloaded, but I've heard this is not a completely reliable safety measure when multiple strips are chained:
So if you've followed codes, then your circuit is safe, so long as you don't do something really stupid such as daisy chaining devices or physically modifying plugs to fit in receptacles they don't belong.