{% schema %}
{
	"name": {
		"en" : "Price"
	},
	"settings": [
		{
			"type": "product",
			"id": "main_product",
			"label": "Main Product",
			"info": "The main offer"
		}
	],
	"presets": [
			{
				"name": "Default",
				"category": "Pricing"
			}
	]
}
{% endschema %}

I then want to select the price of the selected product in the settings like this

{{settings.main_product.price}}

doing this though does give me the name of the product

{{settings.main_product}}

so this works

{{ all_products[settings.main_product].price | money  }}

https://www.cadence-labs.com/2019/07/shopify-add-dynamic-sections-to-page/

https://lssrvn.com/advanced-shopify-building-dynamic-sections-on-custom-pages