Per TIMATIC, the database used by airlines, as a Canadian citizen and resident you're only allowed to enter Spain if flying directly from Canada, Bulgaria, Croatia, Cyprus, Ireland, Romania or a Schengen state. That's why you were denied boarding.
As the UK doesn't have an entry ban, you'll be good for the return trip, though if staying overnight, you're ...
Per TIMATIC, the database used by airlines:
Visa required, except for Passengers transiting through Athens (ATH)
and arriving from a non-Schengen Member State with a confirmed onward
ticket for a flight within 24 hours to a third country which is not a
Schengen Member State.
So if your trip is on a single ticket, you don't need a visa.
The Timtac entry is correct and covers the exact situation you are describing.
The entry contains the text :
This does not apply to residents of Japan with the Letter of Confirmation of Submitting Necessary Documentation for Re-entry into Japan, and a medical certificate with a negative Coronavirus (COVID-19) test result. The test must have been taken at ...
Oh yes, for sure! In my spare time I liaise with the IATA sourcing manager on an unofficial, voluntary basis, and can't count the amount of corrections I've had to request over the years (after verifying facts with national authorities). A correction hasn't always turned out to be justified (with authorities occasionally giving me erroneous info), but a ...
This seems like a scam
While a Nigerian citizen will need a Visa to visit the UK, a tax certificate isn't listed on the Documents you must provide nor the full list of supporting documents you can provide.
While the question is very short, this looks like it could be the case of a common scam where a "friend" you met online wants to visit you / ...