Sometimes when we don't want to repeat a noun, we can replace it with one or ones.
Would you like a sandwich? Yes, I'd like one. (= Yes, I'd like a sandwich.)
Is there a cashpoint near here? Yes, there's one around the corner. (= Yes, there's a cashpoint round the corner.)
"One" replaces a countable noun in the singular, and "ones" replaces a countable noun in the plural.
this/that + one, these/those + ones
We can use one and ones with the demonstratives — this, these, that, those.
Which cupcake would you like to have? This one or that one? (= this cake or that cake)
Which exercise do you want to do first, this one or that one? (= this exercise or that exercise)
I don't know which headphones to buy, these ones or those ones. (= these headphones or those headphones)
Which sunglasses suit me better, these ones or those ones? (= these sunglasses or those sunglasses)
the + one, the + ones
One and ones can replace a noun with the definite article "the". We keep the article in this case.
— Are you talking about your old job?
— No, I'm talking about the new one. (= the new job)
— Which sneakers are yours?
— The ones with red shoelaces. (the sneakers)
— I can't find my jeans!
— The grey ones or the blue ones? (= the grey jeans or the blue jeans)
— Shall I take extra chairs from the conference room?
— No, take the ones from our office room. (= the chairs)
Which button should I press, the right one or the left one? (= the right button or the left button)
Let's not discuss these problems, let's discuss the other ones. (= the other problems)
a/an + adjective + one, some + adjective + ones
A nice car → a nice one (countable singular)
Some interesting articles → some interesting ones (countable plural)
As you see, when we have a/an + adjective + countable noun, we can replace the noun with "one".
In the same way, in case of some + adjective + countable plural noun, we can replace the noun with "ones".
Note, that an + other merge into one word — "another".
My plate is dirty, I'll take a clean one. (= a clean plate)
This house is too small for our big family, we need a new one. (= a new house)
That app had a low rating, so I looked for another one. (= another app)
All these colour pencils are dull, I need some sharp ones. (= some sharp colour pencils)
These tomatoes have gone bad. Let's get some fresh ones. (= some fresh tomatoes)