Does the rule on casting a bonus action spell apply when you take a bonus action granted by a spell?

The rule on casting a spell as a bonus action (see PH, 202) applies only on the turn you cast the spell. For example, spiritual weapon can be cast as a bonus action, and it lasts for 1 minute. On the turn you cast it, you can’t cast another spell before or after it, unless that spell is a cantrip with a casting time of 1 action. Until spiritual weapon ends, it gives you the option of controlling its spectral weapon as a bonus action. That bonus action does not involve casting a spell, despite the fact that it’s granted by a spell, so you can control the weapon and cast whatever spell you like on the same turn.