1. After each meal, I drew a chart with /on a computer that I had bought by paying a lot of money.

2. I drew the chart on the computer after the meal.

3. With the money, I bought a computer, and I drew spending charts on/with it.

4. I earned some money by selling drinks during the summer vacation. I bought a used / secondhand computer with the money. After the meal, I turned on the computer and drew a spending chart on the notepad.

(Are the sentences all correct? Can we use both 'on' and 'with' before 'a computer'?)

2 answers

It's better to use "on" with "computer" or "the computer" or "a computer."

The sentences are correct and mean approximately the same thing -- with few differences.

You can use either "used" or "second-hand" to describe the computer in #4.
The visual image of drawing a chart "on the computer" could be confusing. For example, I have "Post It" notes on my computer. I assume that you drew the chart on the monitor screen rather than the computer body. For this reason, although "on" is adequate, I would suggest using "with" since it is the instrument used in making the chart. Example 4 is better at clarifying this.

Since the cost is not related to being able to draw a chart (#1), I would suggest breaking it up into two sentences.

I hope this helps a little more. Thanks for asking.