2011 JKU Freedom hardtop fit a 2018 JKU soft top?

In short yes.

Expanding on that, I think in 2011 was the year they upgraded the hardtop, but I don't quite remember. It's easy to tell what top you are looking at by looking at the rear window. If that window is the same width as the tailgate you have an early top. If the window is wider than the tailgate you have the newer version.

Other than some guide pegs that were added to the newer version, which doesn't affect a 2018 wrangler one way or the other (I put a top from a 2014 on a 2009 jeep and had to remove the pegs) they universally fit.

Older tops have smaller windows on the sides as well so have less visibility.

Just looked it up and I think the 2011 was the newer version. Here is a link describing the differences.

https://www.quadratec.com/c/reference/what-are-differences-between-jk-wrangler-hardtops