Find the requirements here: DNN Platform Requirements -- DNN Docs (dnncommunity.org)
This is refering to DNN 9.4.0, but I think it is still valid. Anyway, if you run into problems it is no problem to install .Net 4.8 after you upgraded. Or upgrade .Net before, there is no reason not to do it.
Happy DNNing!
Michael