This 40W high power DC-DC Buck converter offers a 6~14V input voltage range and up to 5V/8A output. Featuring a small body, high conversion ratio, strong heat dissipation…
Technically it should be. The Pi 4 and 5 both ask for 5.1V so you may experience some low power warnings. Power in is about equal to power out so also consider your source here.
Jacks spot on the money, the Pi 4 is more than happy to be powered up a few different ways (5V through the pins, or USB).
But the Pi 5 is a bit more tempermental, if powered up with a non-PD source (this board, even though it can, in theory, deliver up to 8A) will still limit the USB output current as the power source hasnt communicated its max output.
With a bit more information about your project we should be able to help out a bit more!
Liam