Your code is almost there, I corrected some strings in your sheet Formula.
From this:
=substitute(index(IMPORTHTML("https://finviz.com/quote.ashx&t="&MCD&"&p=d","table",10),9,4),"*","")
To This:
=substitute(index(IMPORTHTML("https://finviz.com/quote.ashxt="&"MCD"&"&p=d","table",10),7,4),"*","")
I corrected the Value of your concatenation from "&MCD&"
to "&"MCD"&"
to make the link work.
To get the desired output the table display below will help you navigate the table.
This is the step by step on how you get each data you want base on the function you've given.
To get the desired output you just need to navigate your parameters Row and Column
To get the desired data a sample below is how you get the P/FCF you just need to adjust your row and column.
Sample function: =INDEX(url, 7, 4)
Reference: