I'm setting up my Raspberry Pi 4b 2GB RAM in headless mode with a 64-bit Raspberry Pi OS Lite. It won't have anything plugged into it, but for an ethernet cable. It'll be performing FAH tasks (Dogecoin Folding At Home); however, I'm trying to find out how much energy it will use in this state (think maximum CPU usage is ideal). How much power will it use in, for example, a year?
Raspberry Pi Trading (RPT) has recommendations for various models which range from 700mA to 3.0A.
For the Pi4 "Typical bare-board active current consumption" is 600mA
https://www.raspberrypi.com/news/thermal-testing-raspberry-pi-4/ Shows comparison of Pi3B+ & Pi4.
Without anything connected to Raspberry Pi 4’s USB 3.0 ports and the latest firmware Raspberry Pi 4 draws 2.47W at idle and 6.79W running a worst-case synthetic load.
Only you can estimate the load of your application, but will be between 2.47W and 6.79W
You ask "How much power will it use in … a year?" which is a meaningless question, but you could calculate the expected Energy consumption.