Is ‘to’ a preposition or a particle? Well, in these examples it’s followed by verbs (cook, bake, help etc.) Prepositions are followed by nouns (prepositional phrases are made up of preposition + noun, in other words,) so we can conclude that ‘to’ is not a preposition here. Here are some examples of ‘to’ prepositional phrases as verb complements.
The trail led to the road.
He spoke to the crowd using a megaphone.
Count to ten before you open your eyes.
This is how prepositions are traditionally presented – as words that have NP complements. In a recent treatment of English grammar by Huddleston and Pullum, however, the scope of prepositions has been widened. In their reading, a preposition can itself take another prepositional phrase or even a subordinate clause as a complement. For example,
PP: He called out from behind the sofa.
SC: She went home after the concert had ended.
However, this widening of scope does not extend to verb complements like to-infinitivals. Here is what Huddleston and Pullum have to say about this case (from ‘A Student’s Introduction to English Grammar’ p. 205).
To-infinitivals are marked by the word to, which derives historically from the preposition to (note the strong similarity in meaning between I went to the doctor and I went to see the doctor) but long ago lost its prepositional properties. It is now unique: no other item has exactly the same grammatical properties. We take it to be a member of the subordinator category – a special marker for VPs of infinitival clauses.
There are some parallels between English and German here (e.g. ‘start to help’ = ‘anfangen zu hilfen’), but for instance Russian and some other Slavic languages are like Spanish with only the bare infinitive. Look farther afield to say Chinese and even the concept of ‘infinitive’ becomes meaningless. Minute comparisons like this aren’t particularly fruitful when learning languages, in my view.