**Morse theory** is an example of such method. The classification of compact surfaces using Morse theory is done for example in the book of Hirsch, [*Differential topology*](https://link.springer.com/book/10.1007/978-1-4684-9449-5). The book of Milnor, *Lectures on the h-cobordism theorem* goes a step further by proving the Poincare conjecture in dimension bigger than five using Morse theory. 

It should be emphasized however that "look at $F(M)$, the set of functions on $M$" is just one way to understand a space $M$ amongst many others.