Q.apple tree
I have no flowers or apples and have not for a few years.

This could be associated with how the tree was pruned in the past. Our warm winters in some parts of the country have played havoc on fruit trees as well so this may be a variable.

You may want to start with a soil test. You can make determinations on soil and if you are needed to fertilize or amend your soil.
You County Extension Office can help you with a soil test.
The article below can help you pinpoint the lack of fruit.
https://www.gardeningknowhow.com/edible/fruits/apples/no-fruit-on-apple-trees.htm