"Even if you are staying with family or friends"
That phrase in GOV.UK's advice is the useful part. Visitors staying with relatives often assume they won't be questioned about money or exit plans. GOV.UK says the officer may ask for a return or onward ticket and proof of funds regardless.
Visa or eTA, not both
Most visitors need either a visa or an Electronic Travel Authorization (eTA) to enter or transit Canada, not both. Check which applies to your passport on the Government of Canada's online tool before booking anything.
Applying for a Canadian visitor visa rather than flying on an eTA? See our Canada visitor visa itinerary guide.
Passport
Valid for the whole planned stay. If you transit another country on the way, check its rules: GOV.UK notes many require 6 months' validity.