To solve for Olivia's allowance given the ratio of their allowances and Sylvia's allowance, we can break down the problem.
1. **Understanding the Ratio**: The ratio of Olivia's allowance to Sylvia's allowance is 2:3. This means for every 2 parts of Olivia's allowance, Sylvia gets 3 parts.
2. **Finding the Total Parts**: The total parts in the ratio are \(2 + 3 = 5\) parts.
3. **Determining the Value of One Part**: If Sylvia receives $21 (which represents 3 parts), we can find the value of one part by dividing Sylvia's allowance by the number of parts she has:
\[
\text{Value of one part} = \frac{21}{3} = 7
\]
4. **Calculating Olivia's Allowance**: Now that we know the value of one part, we can find Olivia's allowance. Since Olivia gets 2 parts, we multiply the value of one part by 2:
\[
\text{Olivia's allowance} = 2 \times 7 = 14
\]
Therefore, Olivia received **$14**.