Shimano RS505 freehub body replacement
The compatibility charts don't deal with physical compatibility of replacement freehubs. They're for more broadly which components are compatible together. Replacment freehub compatibility has to do with overall length, shell interface, axle type, and the profile (shape) of the races and the sealing parts. There is a lot of cross-compatibility within Shimano but there are stumbling blocks too. They do not make it easy to figure out.

Here's the basic procedure:


Find the exploded view document for the hub model. Usually this
starts with just googling 'fh-rs505 ev'. In this case that works
fine, the first result is currently a third-party site that as a
public service puts up all the ev pdfs from the yearly technical
manual releases.
Find the 'freewheel body unit' part number, in this case Y31F98080. That is the Shimano part you want if you can get it.
See if you can find someone selling that exact part number. This is hit or miss. Here it's a relatively less commonly seen hub model. I do see a couple sellers around the world that have it, so maybe that's the end of the trail for you. That also implies that Shimano is selling it aftermarket to vendors, or at least did at some point, and/or at least in some countries, which means check in with your bike shop who can login to Shimano's b2b site and see if they can order it for you.
One of the things that gets tricky is that for some insane reason, the part number listed on the ev pdf sometimes has a hyphen or a space inserted in other mediums, so you kind of have to search for it a couple different ways to know you're going to see it if it's there. For example sometimes Shimano would list the same part number as 'Y31F 98080'.
If you can't get hold of the exact part number, then you get into the world of finding a replacement that's physically compatible with the shell and the axle type (standard M10x1 versus proprietary oversized), and jumping through the hoops required to make the other parameters work. There are some other questions that cover this, but basically you have to worry about whether your existing FH-RS505 right side axle hardware (cone, spacers, seals) are going to play nice with whatever freehub body you find that can go on the shell, and then when it's all done you have to worry about the spacing and dish of the complete wheel, which will change a little if certain dimensions of the new freehub are not physically identical to the old one. Often this just means buying all new drive-side axle hardware to match the new freehub body. That can be overkill but it's usually what I do for people to ensure there aren't problems down the line. There are aspects to it that aren't really possible to judge reliably by eyeball. In some cases you'll be able to use the ev documents to find a surrogate freehub that uses the same cone and seals as the old one.