There are many reasons to make raised beds: to make cultivation more convenient, to increase the depth of soil, to allow gardening to take place where there is no soil, to improve drainage – the list goes on. I am often asked what the beds should be filled with, once they are made, and the answer is not that simple.
The answer depends on what size the beds are, what they are destined to grow and on budget and fitness.
Small beds, often of wood or plastic, set on a hard surface, are basically just large pots and could be filled with multipurpose compost. It is readily available, free from weeds and pests and easy to handle. But, apart from the cost, there are disadvantages. The compost, usually based on composted organic matter, will deteriorate over time and it has limited nutrients. Things will do well for the first season but then will decline unless well fed and the compost topped up. It is all rather artificial.
A compost based on loam would be better, such as John Innes, but the cost is likely to be prohibitive. A better option is topsoil but this varies hugely. I recently got topsoil for my beds and, despite looking at it before buying, it is very stony. As it happens it is not a huge problem because my beds are destined to be filled with plants that want good drainage, but some went into a beds that was destined to grow carrots and for these, stony soil is a problem.
Your own garden soil is also an option, though it is best if it is not full of weeds and you may wish to improve it. Some of my beds are filled with the native soil but I have dug in lots of compost and/or sand to improve the soil. When beds are on the soil rather than a hard surface you can dig them over and improve the soil under them too, giving a good, depth of soil.
Garden compost can be dug into your soil to improve it but do not fill beds with it – it is too variable and may not be fine enough for all plants – though a pile of it will keep most squashes happy.
So the short answer is that topsoil, if you can get it in tonne bags at reasonable cost, is a good solution. Your own garden soil can be used, if you have it spare, and improve it. Multipurpose compost is only sensible for small beds.